1# Copyright (C) 2025 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 16ohos_shared_library("cj_bluetooth_a2dp_ffi") { 17 sanitize = { 18 cfi = true # Enable/disable control flow integrity detection 19 boundary_sanitize = true # Enable boundary san detection 20 cfi_cross_dso = true # Cross-SO CFI Checks 21 integer_overflow = true # Enable integer overflow detection 22 ubsan = true # Enable some Ubsan options 23 debug = false 24 } 25 26 if (!defined(defines)) { 27 defines = [] 28 } 29 include_dirs = [ 30 "include", 31 "../../js/napi/include", 32 "../../../frameworks/inner/include", 33 ] 34 35 deps = [ 36 "../../../frameworks/inner:btframework", 37 "../../../frameworks/js/napi/src/common:bt_napi_common", 38 ] 39 40 external_deps = [ 41 "ability_base:want", 42 "ability_runtime:ability_manager", 43 "bundle_framework:appexecfwk_base", 44 "bundle_framework:appexecfwk_core", 45 "c_utils:utils", 46 "hilog:libhilog", 47 "hitrace:hitrace_meter", 48 "ipc:ipc_single", 49 "libuv:uv", 50 "napi:ace_napi", 51 "napi:cj_bind_ffi", 52 "napi:cj_bind_native", 53 ] 54 55 sources = [ 56 "src/bluetooth_a2dp_ffi.cpp", 57 "src/bluetooth_a2dp_impl.cpp", 58 "src/bluetooth_a2dp_observer_impl.cpp", 59 "src/bluetooth_a2dp_utils.cpp", 60 ] 61 62 if (is_ohos) { 63 defines += [ "OHOS_PLATFORM" ] 64 } 65 66 if (is_mingw) { 67 defines += [ "WINDOWS_PLATFORM" ] 68 } 69 70 innerapi_tags = [ "platformsdk" ] 71 72 part_name = "bluetooth" 73 subsystem_name = "communication" 74} 75