• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2022 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
14if (defined(ohos_lite)) {
15  import("//build/lite/config/component/lite_component.gni")
16} else {
17  import("//build/ohos.gni")
18}
19
20import("//foundation/distributedhardware/device_manager/device_manager.gni")
21innerkits_path_mini = "${devicemanager_path}/interfaces/inner_kits"
22kits_path = "${devicemanager_path}/interfaces/kits"
23
24if (ohos_kernel_type == "liteos_m") {
25  static_library("devicemanager_native_js") {
26    include_dirs = [
27      "//third_party/node/src",
28      "//third_party/json/include",
29      "${common_path}/include",
30      "//commonlibrary/c_utils/base/include",
31      "${kits_path}/js_mini/include",
32      "${utils_path}/include",
33      "//foundation/arkui/ace_engine_lite/interfaces/inner_api/builtin/base",
34      "//foundation/arkui/ace_engine_lite/interfaces/inner_api/builtin/jsi",
35      "//foundation/arkui/ace_engine_lite/interfaces/inner_api/builtin/async",
36      "//foundation/arkui/ace_engine_lite/frameworks/include/context",
37      "${innerkits_path_mini}/native_cpp/include",
38    ]
39
40    sources = [
41      "${kits_path}/js_mini/src/dm_native_event.cpp",
42      "${kits_path}/js_mini/src/native_devicemanager_js.cpp",
43    ]
44
45    deps = [
46      "${innerkits_path_mini}/native_cpp:devicemanagersdk_mini",
47      "${utils_path}:devicemanagerutils_mini",
48    ]
49
50    defines = [
51      "HI_LOG_ENABLE",
52      "DH_LOG_TAG=\"devicemanagerkit_js\"",
53      "LOG_DOMAIN=0xD004100",
54    ]
55  }
56}
57