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 14if (defined(ohos_lite)) { 15 import("//build/ohos.gni") 16 import("../../../../../hdf_core/adapter/uhdf/uhdf.gni") 17 import("../../../camera.gni") 18 config("utils_config") { 19 visibility = [ ":*" ] 20 cflags = [ 21 "-DGST_DISABLE_DEPRECATED", 22 "-DHAVE_CONFIG_H", 23 "-DCOLORSPACE=\"videoconvert\"", 24 ] 25 cflags_cc = [ "-std=c++17" ] 26 include_dirs = [ "watchdog" ] 27 } 28 29 ohos_shared_library("peripheral_camera_utils") { 30 sources = [ "watchdog/watchdog.cpp" ] 31 include_dirs = [] 32 libs = [] 33 defines = [] 34 deps = [] 35 public_configs = [ ":utils_config" ] 36 subsystem_name = "hdf" 37 part_name = "drivers_peripheral_camera" 38 } 39} else { 40 import("//build/ohos.gni") 41 import("../../../camera.gni") 42 config("utils_config") { 43 visibility = [ ":*" ] 44 cflags = [ 45 "-DGST_DISABLE_DEPRECATED", 46 "-DHAVE_CONFIG_H", 47 "-DCOLORSPACE=\"videoconvert\"", 48 ] 49 include_dirs = [ 50 "watchdog", 51 "exif", 52 ] 53 } 54 ohos_shared_library("peripheral_camera_utils") { 55 sources = [ 56 "exif/exif_utils.cpp", 57 "watchdog/watchdog.cpp", 58 ] 59 include_dirs = [ 60 "$camera_path/include", 61 "//third_party/libexif", 62 ] 63 libs = [] 64 defines = [] 65 deps = [ "//third_party/libexif:libexif" ] 66 67 external_deps = [ 68 "c_utils:utils", 69 "drivers_interface_camera:metadata", 70 "hdf_core:libhdf_utils", 71 "hilog:libhilog", 72 ] 73 if (enable_camera_device_utest) { 74 defines += [ "CAMERA_DEVICE_UTEST" ] 75 } 76 public_configs = [ ":utils_config" ] 77 install_images = [ chipset_base_dir ] 78 subsystem_name = "hdf" 79 part_name = "drivers_peripheral_camera" 80 } 81} 82