# Copyright (c) 2021-2023 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("//build/ohos.gni") import("./../../sensor.gni") ohos_ndk_library("libsensor_ndk") { output_name = "sensor" ndk_description_file = "./libsensor.json" min_compact_version = "6" } config("sensor_private_config") { include_dirs = [ "$SUBSYSTEM_DIR/frameworks/native/sensor/include", "$SUBSYSTEM_DIR/interfaces/native/include", "$SUBSYSTEM_DIR/utils/common/include", ] } config("sensor_public_config") { include_dirs = [ "include" ] } ohos_shared_library("sensor_interface_native") { output_name = "sensor_agent" sources = [ "src/geomagnetic_field.cpp", "src/sensor_agent.cpp", "src/sensor_algorithm.cpp", ] configs = [ ":sensor_private_config" ] public_configs = [ ":sensor_public_config" ] deps = [ "$SUBSYSTEM_DIR/frameworks/native/sensor:libsensor_native", "$SUBSYSTEM_DIR/interfaces/native:libsensor_ndk", ] external_deps = [ "c_utils:utils", "eventhandler:libeventhandler", "hilog:libhilog", "ipc:ipc_core", "safwk:system_ability_fwk", ] part_name = "sensor" innerapi_tags = [ "platformsdk" ] subsystem_name = "sensors" } group("sensor_ndk_target") { deps = [ ":sensor_interface_native" ] }