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" 18ohos_shared_library("ble") { 19 stack_protector_ret = true 20 21 #install_enable = true 22 include_dirs = [ 23 "$BT_NAPI_DIR/include", 24 "$BT_PART_DIR/frameworks/inner/common", 25 ] 26 27 defines = [ 28 "BT_LOG_TAG = \"bluetooth_napi\"", 29 "BT_LOG_DOMAIN = 0xD000100", 30 "ENABLE_NAPI_BLUETOOTH_MANAGER", 31 "BLUETOOTH_API_SINCE_10", 32 ] 33 34 sources = [ 35 "$BT_NAPI_DIR/src/common/napi_async_callback.cpp", 36 "$BT_NAPI_DIR/src/common/napi_async_work.cpp", 37 "$BT_NAPI_DIR/src/common/napi_bluetooth_error.cpp", 38 "$BT_NAPI_DIR/src/common/napi_bluetooth_event.cpp", 39 "$BT_NAPI_DIR/src/common/napi_bluetooth_utils.cpp", 40 "$BT_NAPI_DIR/src/common/napi_native_object.cpp", 41 "$BT_NAPI_DIR/src/common/napi_timer.cpp", 42 "$BT_NAPI_DIR/src/parser/napi_parser_utils.cpp", 43 "napi_bluetooth_ble.cpp", 44 "napi_bluetooth_ble_advertise_callback.cpp", 45 "napi_bluetooth_ble_central_manager_callback.cpp", 46 "napi_bluetooth_ble_utils.cpp", 47 "napi_bluetooth_gatt_client.cpp", 48 "napi_bluetooth_gatt_client_callback.cpp", 49 "napi_bluetooth_gatt_server.cpp", 50 "napi_bluetooth_gatt_server_callback.cpp", 51 "native_module_ble.cpp", 52 ] 53 54 deps = [ "$BT_PART_DIR/frameworks/inner:btframework" ] 55 56 external_deps = [ 57 "c_utils:utils", 58 "hilog:libhilog", 59 "ipc:ipc_single", 60 "libuv:uv", 61 "napi:ace_napi", 62 ] 63 64 relative_install_dir = "module/bluetooth" 65 part_name = "bluetooth" 66 subsystem_name = "communication" 67} 68