• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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("a2dp") {
20  stack_protector_ret = true
21
22  #install_enable = true
23  include_dirs = [
24    "$BT_NAPI_DIR/include",
25    "$BT_NAPI_DIR/src",
26    "$BT_PART_DIR/frameworks/inner/common",
27  ]
28
29  defines = [
30    "BT_LOG_TAG = \"bluetooth_napi\"",
31    "BT_LOG_DOMAIN = 0xD000100",
32    "ENABLE_NAPI_BLUETOOTH_MANAGER",
33    "BLUETOOTH_API_SINCE_10",
34  ]
35
36  sources = [
37    "$BT_NAPI_DIR/src/a2dp/napi_bluetooth_a2dp_src.cpp",
38    "$BT_NAPI_DIR/src/a2dp/napi_bluetooth_a2dp_src_observer.cpp",
39    "$BT_NAPI_DIR/src/a2dp/native_module_a2dp.cpp",
40    "$BT_NAPI_DIR/src/common/napi_async_callback.cpp",
41    "$BT_NAPI_DIR/src/common/napi_async_work.cpp",
42    "$BT_NAPI_DIR/src/common/napi_bluetooth_error.cpp",
43    "$BT_NAPI_DIR/src/common/napi_bluetooth_event.cpp",
44    "$BT_NAPI_DIR/src/common/napi_bluetooth_utils.cpp",
45    "$BT_NAPI_DIR/src/common/napi_native_object.cpp",
46    "$BT_NAPI_DIR/src/common/napi_timer.cpp",
47    "$BT_NAPI_DIR/src/parser/napi_parser_utils.cpp",
48  ]
49
50  deps = [
51    "$BT_PART_DIR/frameworks/inner:btframework",
52    "//third_party/libuv:uv",
53  ]
54
55  external_deps = [
56    "ability_base:want",
57    "ability_runtime:ability_manager",
58    "bundle_framework:appexecfwk_base",
59    "bundle_framework:appexecfwk_core",
60    "c_utils:utils",
61    "hilog:libhilog",
62    "ipc:ipc_single",
63    "napi:ace_napi",
64  ]
65
66  relative_install_dir = "module/bluetooth"
67  part_name = "bluetooth"
68  subsystem_name = "communication"
69}
70