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
14if (defined(ohos_lite)) {
15  import("//build/lite/config/component/lite_component.gni")
16} else {
17  import("//build/ohos.gni")
18}
19import("//foundation/distributedhardware/device_manager/device_manager.gni")
20if (defined(ohos_lite)) {
21  if (ohos_kernel_type == "linux") {
22    shared_library("devicemanagerradar") {
23      include_dirs = [
24        "include",
25        "${common_path}/include",
26        "${innerkits_path}/native_cpp/include",
27        "${c_utils_path}/include",
28        "//third_party/cJSON",
29      ]
30
31      sources = [ "src/lite/dm_radar_helper.cpp" ]
32
33      defines = [
34        "LITE_DEVICE",
35        "DH_LOG_TAG=\"devicemanagerradar\"",
36        "LOG_DOMAIN=0xD004110",
37      ]
38
39      deps = [
40        "//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared",
41        "//base/startup/init/interfaces/innerkits:libbegetutil",
42        "//commonlibrary/utils_lite:utils",
43        "//third_party/bounds_checking_function:libsec_shared",
44      ]
45    }
46  }
47} else {
48  ohos_shared_library("devicemanagerradar") {
49    include_dirs = [
50      "include",
51      "${common_path}/include",
52      "${innerkits_path}/native_cpp/include",
53    ]
54
55    sources = [ "src/dm_radar_helper.cpp" ]
56
57    defines = [
58      "HI_LOG_ENABLE",
59      "DH_LOG_TAG=\"devicemanagerradar\"",
60      "LOG_DOMAIN=0xD004110",
61    ]
62
63    external_deps = [
64      "access_token:libaccesstoken_sdk",
65      "access_token:libtokenid_sdk",
66      "cJSON:cjson",
67      "c_utils:utils",
68      "hilog:libhilog",
69      "hisysevent:libhisysevent",
70      "init:libbegetutil",
71      "ipc:ipc_core",
72      "ipc:ipc_single",
73    ]
74
75    subsystem_name = "distributedhardware"
76
77    part_name = "device_manager"
78  }
79}
80