1bae4d13cSopenharmony_ci# Copyright (c) 2021-2023 Huawei Device Co., Ltd. 2bae4d13cSopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License"); 3bae4d13cSopenharmony_ci# you may not use this file except in compliance with the License. 4bae4d13cSopenharmony_ci# You may obtain a copy of the License at 5bae4d13cSopenharmony_ci# 6bae4d13cSopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0 7bae4d13cSopenharmony_ci# 8bae4d13cSopenharmony_ci# Unless required by applicable law or agreed to in writing, software 9bae4d13cSopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS, 10bae4d13cSopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11bae4d13cSopenharmony_ci# See the License for the specific language governing permissions and 12bae4d13cSopenharmony_ci# limitations under the License. 13bae4d13cSopenharmony_ci 14bae4d13cSopenharmony_ciimport("//build/ohos.gni") 15bae4d13cSopenharmony_ciimport("./../../../sensor.gni") 16bae4d13cSopenharmony_ci 17bae4d13cSopenharmony_ciohos_shared_library("libsensor") { 18bae4d13cSopenharmony_ci include_dirs = [ 19bae4d13cSopenharmony_ci "$SUBSYSTEM_DIR/frameworks/native/include", 20bae4d13cSopenharmony_ci "$SUBSYSTEM_DIR/interfaces/inner_api", 21bae4d13cSopenharmony_ci "$SUBSYSTEM_DIR/frameworks/js/napi/include", 22bae4d13cSopenharmony_ci "$SUBSYSTEM_DIR/utils/common/include", 23bae4d13cSopenharmony_ci ] 24bae4d13cSopenharmony_ci defines = [ 25bae4d13cSopenharmony_ci "APP_LOG_TAG = \"sensorJs\"", 26bae4d13cSopenharmony_ci "LOG_DOMAIN = 0xD002700", 27bae4d13cSopenharmony_ci ] 28bae4d13cSopenharmony_ci sources = [ 29bae4d13cSopenharmony_ci "src/sensor_js.cpp", 30bae4d13cSopenharmony_ci "src/sensor_napi_error.cpp", 31bae4d13cSopenharmony_ci "src/sensor_napi_utils.cpp", 32bae4d13cSopenharmony_ci "src/sensor_system_js.cpp", 33bae4d13cSopenharmony_ci ] 34bae4d13cSopenharmony_ci branch_protector_ret = "pac_ret" 35bae4d13cSopenharmony_ci sanitize = { 36bae4d13cSopenharmony_ci cfi = true 37bae4d13cSopenharmony_ci cfi_cross_dso = true 38bae4d13cSopenharmony_ci debug = false 39bae4d13cSopenharmony_ci } 40bae4d13cSopenharmony_ci deps = [ 41bae4d13cSopenharmony_ci "$SUBSYSTEM_DIR/frameworks/native:sensor_interface_native", 42bae4d13cSopenharmony_ci "$SUBSYSTEM_DIR/utils/common:libsensor_utils", 43bae4d13cSopenharmony_ci ] 44bae4d13cSopenharmony_ci external_deps = [ 45bae4d13cSopenharmony_ci "bundle_framework:appexecfwk_base", 46bae4d13cSopenharmony_ci "bundle_framework:appexecfwk_core", 47bae4d13cSopenharmony_ci "c_utils:utils", 48bae4d13cSopenharmony_ci "hilog:libhilog", 49bae4d13cSopenharmony_ci "ipc:ipc_single", 50bae4d13cSopenharmony_ci "napi:ace_napi", 51bae4d13cSopenharmony_ci "safwk:system_ability_fwk", 52bae4d13cSopenharmony_ci "samgr:samgr_proxy", 53bae4d13cSopenharmony_ci ] 54bae4d13cSopenharmony_ci relative_install_dir = "module" 55bae4d13cSopenharmony_ci part_name = "sensor" 56bae4d13cSopenharmony_ci subsystem_name = "sensors" 57bae4d13cSopenharmony_ci} 58bae4d13cSopenharmony_ci 59bae4d13cSopenharmony_cigroup("sensor_js_target") { 60bae4d13cSopenharmony_ci deps = [ ":libsensor" ] 61bae4d13cSopenharmony_ci} 62