1# Copyright (C) 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") 15 16BT_PART_DIR = "../../../../.." 17BT_NAPI_DIR = "$BT_PART_DIR/frameworks/js/napi" 18 19ohos_shared_library("weardetection") { 20 branch_protector_ret = "pac_ret" # Enable PAC CFI 21 stack_protector_ret = true 22 23 sanitize = { 24 cfi = true 25 boundary_sanitize = true 26 cfi_cross_dso = true 27 debug = false 28 } 29 30 include_dirs = [ 31 "$BT_PART_DIR/frameworks/inner/include", 32 "$BT_NAPI_DIR/include", 33 "$BT_PART_DIR/interfaces/inner_api/include", 34 "$BT_NAPI_DIR/src", 35 ] 36 37 defines = [ 38 "BT_LOG_TAG = \"bluetooth_napi\"", 39 "BT_LOG_DOMAIN = 0xD000100", 40 "ENABLE_NAPI_BLUETOOTH_MANAGER", 41 "BLUETOOTH_API_SINCE_10", 42 "BT_MODULE_NAME = \"bluetooth.wearDetection\"", 43 ] 44 45 sources = [ 46 "$BT_NAPI_DIR/src/audio_manager/napi_bluetooth_audio_manager.cpp", 47 "$BT_NAPI_DIR/src/audio_manager/native_module_audio_manager.cpp", 48 ] 49 50 deps = [ "$BT_PART_DIR/frameworks/inner:btframework" ] 51 52 external_deps = [ 53 "ability_base:want", 54 "ability_runtime:ability_manager", 55 "bundle_framework:appexecfwk_base", 56 "bundle_framework:appexecfwk_core", 57 "c_utils:utils", 58 "hilog:libhilog", 59 "hitrace:hitrace_meter", 60 "ipc:ipc_single", 61 "libuv:uv", 62 "napi:ace_napi", 63 ] 64 65 relative_install_dir = "module/bluetooth" 66 part_name = "bluetooth" 67 subsystem_name = "communication" 68} 69