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