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") 15import("../camera_usb.gni") 16 17if (!defined(ohos_lite)) { 18 import("//build/ohos.gni") 19 import("../../../../../hdf_core/adapter/uhdf2/uhdf.gni") 20 21 config("usb_camera_metadata_manager_config") { 22 visibility = [ ":*" ] 23 cflags = [ 24 "-DGST_DISABLE_DEPRECATED", 25 "-DHAVE_CONFIG_H", 26 ] 27 28 if (enable_camera_device_utest) { 29 cflags += [ 30 "-fprofile-arcs", 31 "-ftest-coverage", 32 ] 33 34 ldflags += [ "--coverage" ] 35 } 36 } 37 38 ohos_shared_library("usb_camera_metadata_manager") { 39 defines = [] 40 if (drivers_peripheral_camera_feature_usb) { 41 defines += [ "CAMERA_BUILT_ON_USB" ] 42 } 43 sources = [ 44 "$camera_path_vdi/dump/src/camera_dump.cpp", 45 "$camera_path_vdi/metadata_manager/src/metadata_config.cpp", 46 "$camera_path_vdi/metadata_manager/src/metadata_controller.cpp", 47 ] 48 include_dirs = [ 49 "$camera_path_vdi/../../interfaces/include", 50 "$camera_path_vdi/include", 51 "$camera_path_vdi/device_manager/include", 52 "$camera_path_vdi/metadata_manager/include", 53 "$camera_path_vdi/dump/include", 54 "$camera_path_vdi/../interfaces", 55 ] 56 57 deps = [ "$camera_path_usb/device_manager:usb_camera_device_manager" ] 58 59 external_deps = [ 60 "drivers_interface_camera:metadata", 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 73 public_configs = [ ":usb_camera_metadata_manager_config" ] 74 install_images = [ chipset_base_dir ] 75 subsystem_name = "hdf" 76 part_name = "drivers_peripheral_camera" 77 } 78} 79