1# Copyright (c) 2021-2024 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 14import("//build/ohos.gni") 15import( 16 "//foundation/distributedhardware/distributed_camera/distributedcamera.gni") 17 18ohos_shared_library("distributed_camera_utils") { 19 branch_protector_ret = "pac_ret" 20 sanitize = { 21 cfi = true 22 cfi_cross_dso = true 23 debug = false 24 boundary_sanitize = true 25 integer_overflow = true 26 ubsan = true 27 } 28 stack_protector_ret = true 29 include_dirs = [ 30 "include/constants", 31 "include/utils", 32 "${feeding_smoother_path}/base", 33 "${feeding_smoother_path}/derived", 34 "${services_path}/cameraservice/base/include", 35 ] 36 37 cflags = [ 38 "-fPIC", 39 "-Wall", 40 ] 41 42 if (!distributed_camera_common) { 43 cflags += [ "-DDCAMERA_MMAP_RESERVE" ] 44 } 45 46 sources = [ 47 "src/utils/anonymous_string.cpp", 48 "src/utils/data_buffer.cpp", 49 "src/utils/dcamera_buffer_handle.cpp", 50 "src/utils/dcamera_hidumper.cpp", 51 "src/utils/dcamera_hisysevent_adapter.cpp", 52 "src/utils/dcamera_hitrace_adapter.cpp", 53 "src/utils/dcamera_utils_tools.cpp", 54 "src/utils/dh_log.cpp", 55 ] 56 57 defines = [ 58 "HI_LOG_ENABLE", 59 "DH_LOG_TAG=\"distributedcamerautils\"", 60 "LOG_DOMAIN=0xD004150", 61 ] 62 63 external_deps = [ 64 "c_utils:utils", 65 "distributed_hardware_fwk:distributedhardwareutils", 66 "dsoftbus:softbus_client", 67 "hdf_core:libhdi", 68 "hilog:libhilog", 69 "hisysevent:libhisysevent", 70 "hitrace:hitrace_meter", 71 "init:libbegetutil", 72 "safwk:system_ability_fwk", 73 "samgr:samgr_proxy", 74 ] 75 76 cflags_cc = cflags 77 relative_install_dir = "chipset-sdk" 78 subsystem_name = "distributedhardware" 79 80 part_name = "distributed_camera" 81} 82