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 31 if (drivers_interface_camera_feature_coverage) { 32 cflags += [ "--coverage" ] 33 ldflags += [ "--coverage" ] 34 } 35 if (defined(ohos_lite)) { 36 sources = [ 37 "src/camera_metadata_info.cpp", 38 "src/camera_metadata_operator.cpp", 39 ] 40 external_deps = [ "hilog_lite:hilog_shared" ] 41 } else { 42 sources = [ 43 "src/camera_metadata_info.cpp", 44 "src/camera_metadata_operator.cpp", 45 "src/metadata_utils.cpp", 46 ] 47 48 if (drivers_interface_camera_feature_vendor_tag == true) { 49 defines = [] 50 defines += [ "CAMERA_VENDOR_TAG" ] 51 } 52 53 deps = [ "../v1_0:libcamera_proxy_1.0" ] 54 external_deps = [ 55 "c_utils:utils", 56 "hilog:libhilog", 57 "ipc:ipc_single", 58 ] 59 } 60 61 install_images = [ system_base_dir ] 62 innerapi_tags = [ 63 "chipsetsdk", 64 "platformsdk_indirect", 65 ] 66 public_configs = [ ":camera_metadata_config" ] 67 part_name = "drivers_interface_camera" 68 subsystem_name = "hdf" 69} 70