1# Copyright (c) 2022 - 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("../../../camera.gni") 15 16if (!defined(ohos_lite)) { 17 import("//build/ohos.gni") 18 import("../../../../../hdf_core/adapter/uhdf2/uhdf.gni") 19 20 config("camera_metadata_manager_config") { 21 visibility = [ ":*" ] 22 cflags = [ 23 "-DGST_DISABLE_DEPRECATED", 24 "-DHAVE_CONFIG_H", 25 ] 26 27 if (enable_camera_device_utest) { 28 cflags += [ 29 "-fprofile-arcs", 30 "-ftest-coverage", 31 ] 32 33 ldflags += [ "--coverage" ] 34 } 35 36 include_dirs = [ "./include" ] 37 } 38 39 ohos_shared_library("peripheral_camera_metadata_manager") { 40 defines = [] 41 if (drivers_peripheral_camera_feature_usb) { 42 defines += [ "CAMERA_BUILT_ON_USB" ] 43 } 44 sources = [ 45 "$camera_path/dump/src/camera_dump.cpp", 46 "$camera_path/metadata_manager/src/metadata_config.cpp", 47 "$camera_path/metadata_manager/src/metadata_controller.cpp", 48 ] 49 include_dirs = [ 50 "$camera_path/../../interfaces/include", 51 "$camera_path/device_manager/include", 52 "$camera_path/metadata_manager/include", 53 "$camera_path/dump/include", 54 "$camera_path/../interfaces", 55 ] 56 57 deps = [ "$camera_path/device_manager:peripheral_camera_device_manager" ] 58 59 if (is_standard_system) { 60 external_deps = [ 61 "graphic_surface:surface", 62 "hdf_core:libhdf_host", 63 "hdf_core:libhdf_ipc_adapter", 64 "hdf_core:libhdf_utils", 65 "hdf_core:libhdi", 66 "hilog:libhilog", 67 "ipc:ipc_single", 68 ] 69 if (use_hitrace) { 70 external_deps += [ "hitrace:hitrace_meter" ] 71 } 72 } else { 73 external_deps = [ "hilog:libhilog" ] 74 } 75 external_deps += [ 76 "drivers_interface_camera:metadata", 77 "ipc:ipc_single", 78 ] 79 80 public_configs = [ ":camera_metadata_manager_config" ] 81 install_images = [ chipset_base_dir ] 82 subsystem_name = "hdf" 83 part_name = "drivers_peripheral_camera" 84 } 85 86 ohos_shared_library("camera_example_vendor_tag_impl") { 87 install_enable = false 88 cflags = [ 89 "-fPIC", 90 "-Wall", 91 ] 92 cflags_cc = cflags 93 include_dirs = [ "./include" ] 94 sources = [ "src/camera_example_vendor_tags.cpp" ] 95 external_deps = [ "drivers_interface_camera:metadata" ] 96 97 part_name = "drivers_peripheral_camera" 98 subsystem_name = "hdf" 99 } 100} 101