1# Copyright (c) 2021-2023 Huawei Device Co., Ltd. 2# Licensed under the Apache License, Version 2.0 (the "License"); 3# you may not use this file except in compliance with the License. 4# You may obtain a copy of the License at 5# 6# http://www.apache.org/licenses/LICENSE-2.0 7# 8# Unless required by applicable law or agreed to in writing, software 9# distributed under the License is distributed on an "AS IS" BASIS, 10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11# See the License for the specific language governing permissions and 12# limitations under the License. 13 14import("//build/ohos.gni") 15import("./../../sensor.gni") 16 17ohos_ndk_library("libsensor_ndk") { 18 output_name = "sensor" 19 ndk_description_file = "./libsensor.json" 20 min_compact_version = "6" 21} 22 23config("sensor_private_config") { 24 include_dirs = [ 25 "$SUBSYSTEM_DIR/frameworks/native/sensor/include", 26 "$SUBSYSTEM_DIR/interfaces/native/include", 27 "$SUBSYSTEM_DIR/utils/common/include", 28 ] 29} 30 31config("sensor_public_config") { 32 include_dirs = [ "include" ] 33} 34 35ohos_shared_library("sensor_interface_native") { 36 output_name = "sensor_agent" 37 sources = [ 38 "src/geomagnetic_field.cpp", 39 "src/sensor_agent.cpp", 40 "src/sensor_algorithm.cpp", 41 ] 42 43 configs = [ ":sensor_private_config" ] 44 public_configs = [ ":sensor_public_config" ] 45 46 deps = [ 47 "$SUBSYSTEM_DIR/frameworks/native/sensor:libsensor_native", 48 "$SUBSYSTEM_DIR/interfaces/native:libsensor_ndk", 49 ] 50 51 external_deps = [ 52 "c_utils:utils", 53 "eventhandler:libeventhandler", 54 "hilog:libhilog", 55 "ipc:ipc_core", 56 "safwk:system_ability_fwk", 57 ] 58 59 part_name = "sensor" 60 innerapi_tags = [ "platformsdk" ] 61 subsystem_name = "sensors" 62} 63 64group("sensor_ndk_target") { 65 deps = [ ":sensor_interface_native" ] 66} 67