1# Copyright (c) 2021 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 include_dirs = [ 20 "//commonlibrary/c_utils/base/include", 21 "//utils/system/safwk/native/include", 22 "include/constants", 23 "include/utils", 24 ] 25 26 cflags = [ 27 "-fPIC", 28 "-Wall", 29 ] 30 31 if (!distributed_camera_common) { 32 cflags += [ "-DDCAMERA_MMAP_RESERVE" ] 33 } 34 35 sources = [ 36 "src/utils/anonymous_string.cpp", 37 "src/utils/data_buffer.cpp", 38 "src/utils/dcamera_buffer_handle.cpp", 39 "src/utils/dcamera_hisysevent_adapter.cpp", 40 "src/utils/dcamera_hitrace_adapter.cpp", 41 "src/utils/dcamera_sa_process_state.cpp", 42 "src/utils/dcamera_utils_tools.cpp", 43 "src/utils/dh_log.cpp", 44 ] 45 46 defines = [ 47 "HI_LOG_ENABLE", 48 "DH_LOG_TAG=\"distributedcamerautils\"", 49 "LOG_DOMAIN=0xD004100", 50 ] 51 52 external_deps = [ 53 "c_utils:utils", 54 "dsoftbus:softbus_client", 55 "graphic_chipsetsdk:buffer_handle", 56 "hisysevent_native:libhisysevent", 57 "hitrace_native:hitrace_meter", 58 "hiviewdfx_hilog_native:libhilog", 59 ] 60 61 cflags_cc = cflags 62 relative_install_dir = "chipset-sdk" 63 subsystem_name = "distributedhardware" 64 65 part_name = "distributed_camera" 66} 67