1# Copyright (c) 2021 - 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 14import("//build/ohos.gni") 15import("//drivers/interface/camera/camera.gni") 16 17config("camera_metadata_config") { 18 include_dirs = [ "./include" ] 19} 20 21ohos_shared_library("metadata") { 22 branch_protector_ret = "pac_ret" 23 24 install_enable = true 25 cflags = [ 26 "-fPIC", 27 "-Wall", 28 ] 29 cflags_cc = cflags 30 cflags_cc += [ "-fstack-protector-strong" ] 31 32 if (drivers_interface_camera_feature_coverage) { 33 cflags += [ "--coverage" ] 34 ldflags += [ "--coverage" ] 35 } 36 all_dependent_configs = [ ":camera_metadata_config" ] 37 if (defined(ohos_lite)) { 38 sources = [ 39 "src/camera_metadata_info.cpp", 40 "src/camera_metadata_operator.cpp", 41 ] 42 external_deps = [ "hilog_lite:hilog_shared" ] 43 } else { 44 sources = [ 45 "src/camera_metadata_info.cpp", 46 "src/camera_metadata_operator.cpp", 47 "src/metadata_utils.cpp", 48 ] 49 50 if (drivers_interface_camera_feature_vendor_tag == true) { 51 defines = [] 52 defines += [ "CAMERA_VENDOR_TAG" ] 53 } 54 55 deps = [ "../v1_0:libcamera_proxy_1.0" ] 56 external_deps = [ 57 "c_utils:utils", 58 "hilog:libhilog", 59 "ipc:ipc_single", 60 ] 61 } 62 63 install_images = [ system_base_dir ] 64 innerapi_tags = [ 65 "chipsetsdk", 66 "platformsdk_indirect", 67 ] 68 public_configs = [ ":camera_metadata_config" ] 69 part_name = "drivers_interface_camera" 70 subsystem_name = "hdf" 71} 72