# Copyright (c) 2021 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") SUBSYSTEM_DIR = "//base/sensors/sensor" ############################################## ohos_ndk_library("libsensor_ndk") { output_name = "sensor" ndk_description_file = "./libsensor.json" min_compact_version = "6" } config("sensor_private_config") { include_dirs = [ "//commonlibrary/c_utils/base/include", "//utils/system/safwk/native/include", "$SUBSYSTEM_DIR/frameworks/native/sensor/include", "$SUBSYSTEM_DIR/utils/include", "$SUBSYSTEM_DIR/interfaces/native/include", "//foundation/communication/ipc/interfaces/innerkits/ipc_core/include", "//base/notification/eventhandler/interfaces/inner_api", ] } 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", "hiviewdfx_hilog_native:libhilog", ] part_name = "sensor" subsystem_name = "sensors" } ############################################## group("sensor_ndk_target") { deps = [ ":sensor_interface_native" ] }