1# Copyright (c) 2023-2024 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")
15import("../../../distributedhardwarefwk.gni")
16
17ohos_shared_library("hardwaremanager") {
18  include_dirs = [
19    "include",
20    "${common_path}/log/include",
21    "${common_path}/utils/include",
22    "${innerkits_path}/include",
23    "${innerkits_path}/include/ipc",
24    "${services_path}/distributedhardwarefwkservice/include/componentmanager",
25    "${services_path}/distributedhardwarefwkservice/include/lowlatency",
26    "${services_path}/distributedhardwarefwkservice/include/utils",
27    "${services_path}/distributedhardwarefwkservice/include/task",
28    "${services_path}/distributedhardwarefwkservice/include/resourcemanager",
29    "${av_trans_path}/common/include",
30    "${utils_path}/include/log",
31  ]
32
33  sources = [ "src/native_distributedhardwarefwk_js.cpp" ]
34
35  deps = [
36    "${distributedhardwarefwk_path}/interfaces/inner_kits:libdhfwk_sdk",
37    "${services_path}/distributedhardwarefwkservice:distributedhardwarefwksvr",
38    "${utils_path}:distributedhardwareutils",
39  ]
40
41  defines = [
42    "HI_LOG_ENABLE",
43    "DH_LOG_TAG=\"distributedhardwaremanager_js\"",
44    "LOG_DOMAIN=0xD004100",
45  ]
46
47  cflags = [
48    "-fstack-protector-strong",
49    "-D_FORTIFY_SOURCE=2",
50    "-O2",
51  ]
52
53  cflags_cc = cflags
54
55  external_deps = [
56    "access_token:libtokenid_sdk",
57    "bundle_framework:appexecfwk_base",
58    "cJSON:cjson",
59    "hilog:libhilog",
60    "ipc:ipc_core",
61    "napi:ace_napi",
62  ]
63
64  subsystem_name = "distributedhardware"
65  relative_install_dir = "module/distributedhardware"
66  part_name = "distributed_hardware_fwk"
67}
68