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 "${utils_path}/include/crypto", 29 "//third_party/cJSON", 30 ] 31 32 sources = [ "src/lite/dm_radar_helper.cpp" ] 33 34 defines = [ 35 "LITE_DEVICE", 36 "DH_LOG_TAG=\"devicemanagerradar\"", 37 "LOG_DOMAIN=0xD004110", 38 ] 39 40 deps = [ 41 "${utils_path}:devicemanagerutils", 42 "//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared", 43 "//base/startup/init/interfaces/innerkits:libbegetutil", 44 "//commonlibrary/utils_lite:utils", 45 "//third_party/bounds_checking_function:libsec_shared", 46 ] 47 } 48 } 49} else { 50 ohos_shared_library("devicemanagerradar") { 51 include_dirs = [ 52 "include", 53 "${common_path}/include", 54 "${innerkits_path}/native_cpp/include", 55 "${utils_path}/include/crypto", 56 ] 57 58 sources = [ "src/dm_radar_helper.cpp" ] 59 60 defines = [ 61 "HI_LOG_ENABLE", 62 "DH_LOG_TAG=\"devicemanagerradar\"", 63 "LOG_DOMAIN=0xD004110", 64 ] 65 66 deps = [ "${utils_path}:devicemanagerutils" ] 67 68 external_deps = [ 69 "cJSON:cjson", 70 "c_utils:utils", 71 "hilog:libhilog", 72 "hisysevent:libhisysevent", 73 "init:libbegetutil", 74 ] 75 76 subsystem_name = "distributedhardware" 77 78 part_name = "device_manager" 79 } 80} 81