179a732c7Sopenharmony_ci# Copyright (c) 2024 Huawei Device Co., Ltd. 279a732c7Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License"); 379a732c7Sopenharmony_ci# you may not use this file except in compliance with the License. 479a732c7Sopenharmony_ci# You may obtain a copy of the License at 579a732c7Sopenharmony_ci# 679a732c7Sopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0 779a732c7Sopenharmony_ci# 879a732c7Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software 979a732c7Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS, 1079a732c7Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1179a732c7Sopenharmony_ci# See the License for the specific language governing permissions and 1279a732c7Sopenharmony_ci# limitations under the License. 1379a732c7Sopenharmony_ci 1479a732c7Sopenharmony_ciif (defined(ohos_lite)) { 1579a732c7Sopenharmony_ci import("//build/lite/config/component/lite_component.gni") 1679a732c7Sopenharmony_ci} else { 1779a732c7Sopenharmony_ci import("//build/ohos.gni") 1879a732c7Sopenharmony_ci} 1979a732c7Sopenharmony_ciimport("//foundation/distributedhardware/device_manager/device_manager.gni") 2079a732c7Sopenharmony_ciif (defined(ohos_lite)) { 2179a732c7Sopenharmony_ci if (ohos_kernel_type == "linux") { 2279a732c7Sopenharmony_ci shared_library("dmdevicecache") { 2379a732c7Sopenharmony_ci include_dirs = [ 2479a732c7Sopenharmony_ci "include", 2579a732c7Sopenharmony_ci "${common_path}/include", 2679a732c7Sopenharmony_ci "${innerkits_path}/native_cpp/include", 2779a732c7Sopenharmony_ci "${utils_path}/include/crypto", 2879a732c7Sopenharmony_ci "//third_party/json/include", 2979a732c7Sopenharmony_ci ] 3079a732c7Sopenharmony_ci 3179a732c7Sopenharmony_ci sources = [ 3279a732c7Sopenharmony_ci "${common_path}/src/dm_anonymous.cpp", 3379a732c7Sopenharmony_ci "src/dm_softbus_cache.cpp", 3479a732c7Sopenharmony_ci ] 3579a732c7Sopenharmony_ci 3679a732c7Sopenharmony_ci defines = [ 3779a732c7Sopenharmony_ci "LITE_DEVICE", 3879a732c7Sopenharmony_ci "DH_LOG_TAG=\"dmdevicecache\"", 3979a732c7Sopenharmony_ci "LOG_DOMAIN=0xD004113", 4079a732c7Sopenharmony_ci ] 4179a732c7Sopenharmony_ci 4279a732c7Sopenharmony_ci deps = [ 4379a732c7Sopenharmony_ci "${dsoftbussdk_path}:softbus_client", 4479a732c7Sopenharmony_ci "${hilog_path}:hilog_shared", 4579a732c7Sopenharmony_ci "${third_path}:libsec_shared", 4679a732c7Sopenharmony_ci "${utils_path}:devicemanagerutils", 4779a732c7Sopenharmony_ci ] 4879a732c7Sopenharmony_ci } 4979a732c7Sopenharmony_ci } 5079a732c7Sopenharmony_ci} else { 5179a732c7Sopenharmony_ci ohos_shared_library("dmdevicecache") { 5279a732c7Sopenharmony_ci sanitize = { 5379a732c7Sopenharmony_ci boundary_sanitize = true 5479a732c7Sopenharmony_ci cfi = true 5579a732c7Sopenharmony_ci cfi_cross_dso = true 5679a732c7Sopenharmony_ci debug = false 5779a732c7Sopenharmony_ci integer_overflow = true 5879a732c7Sopenharmony_ci ubsan = true 5979a732c7Sopenharmony_ci } 6079a732c7Sopenharmony_ci 6179a732c7Sopenharmony_ci include_dirs = [ 6279a732c7Sopenharmony_ci "include", 6379a732c7Sopenharmony_ci "${common_path}/include", 6479a732c7Sopenharmony_ci "${utils_path}/include/crypto", 6579a732c7Sopenharmony_ci ] 6679a732c7Sopenharmony_ci 6779a732c7Sopenharmony_ci sources = [ 6879a732c7Sopenharmony_ci "${common_path}/src/dm_anonymous.cpp", 6979a732c7Sopenharmony_ci "src/dm_softbus_cache.cpp", 7079a732c7Sopenharmony_ci ] 7179a732c7Sopenharmony_ci 7279a732c7Sopenharmony_ci defines = [ 7379a732c7Sopenharmony_ci "HI_LOG_ENABLE", 7479a732c7Sopenharmony_ci "DH_LOG_TAG=\"dmdevicecache\"", 7579a732c7Sopenharmony_ci "LOG_DOMAIN=0xD004113", 7679a732c7Sopenharmony_ci ] 7779a732c7Sopenharmony_ci 7879a732c7Sopenharmony_ci deps = [ "${utils_path}:devicemanagerutils" ] 7979a732c7Sopenharmony_ci 8079a732c7Sopenharmony_ci external_deps = [ 8179a732c7Sopenharmony_ci "bounds_checking_function:libsec_shared", 8279a732c7Sopenharmony_ci "dsoftbus:softbus_client", 8379a732c7Sopenharmony_ci "hilog:libhilog", 8479a732c7Sopenharmony_ci ] 8579a732c7Sopenharmony_ci 8679a732c7Sopenharmony_ci subsystem_name = "distributedhardware" 8779a732c7Sopenharmony_ci 8879a732c7Sopenharmony_ci part_name = "device_manager" 8979a732c7Sopenharmony_ci } 9079a732c7Sopenharmony_ci} 91