# Copyright (c) 2021-2024 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("//build/ohos.gni") import( "//foundation/distributedhardware/distributed_hardware_fwk/distributedhardwarefwk.gni") config("utils_external_config") { include_dirs = [ "${common_path}/utils/include", "${utils_path}/include", ] } ohos_shared_library("distributedhardwareutils") { sanitize = { boundary_sanitize = true integer_overflow = true ubsan = true cfi = true cfi_cross_dso = true debug = false } branch_protector_ret = "pac_ret" public_configs = [ ":utils_external_config" ] include_dirs = [ "${common_path}/log/include", "${common_path}/utils/include", "include", "include/log", ] sources = [ "src/anonymous_string.cpp", "src/device_param_mgr.cpp", "src/dh_utils_hisysevent.cpp", "src/dh_utils_hitrace.cpp", "src/dh_utils_tool.cpp", "src/histreamer_ability_parser.cpp", "src/histreamer_query_tool.cpp", ] defines = [ "HI_LOG_ENABLE", "DH_LOG_TAG=\"distributedhardwareutils\"", "LOG_DOMAIN=0xD004100", "OPENSSL_SUPPRESS_DEPRECATED", ] cflags = [ "-fstack-protector-strong", "-D_FORTIFY_SOURCE=2", "-O2", ] cflags_cc = cflags external_deps = [ "cJSON:cjson", "c_utils:utils", "device_manager:devicemanagersdk", "hilog:libhilog", "hisysevent:libhisysevent", "hitrace:hitrace_meter", "init:libbegetutil", "openssl:libcrypto_shared", "safwk:system_ability_fwk", "zlib:shared_libz", ] subsystem_name = "distributedhardware" part_name = "distributed_hardware_fwk" }