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 "event", 51 "exif", 52 "watchdog", 53 ] 54 } 55 ohos_shared_library("peripheral_camera_utils") { 56 sources = [ 57 "event/camera_hal_hisysevent.cpp", 58 "exif/exif_utils.cpp", 59 "watchdog/watchdog.cpp", 60 ] 61 include_dirs = [ 62 "$camera_path/include", 63 "$camera_path/utils/event", 64 ] 65 libs = [] 66 defines = [] 67 68 external_deps = [ 69 "c_utils:utils", 70 "drivers_interface_camera:metadata", 71 "hdf_core:libhdf_utils", 72 "hilog:libhilog", 73 "hisysevent:libhisysevent", 74 "libexif:libexif", 75 ] 76 if (enable_camera_device_utest) { 77 defines += [ "CAMERA_DEVICE_UTEST" ] 78 } 79 public_configs = [ ":utils_config" ] 80 install_images = [ chipset_base_dir ] 81 subsystem_name = "hdf" 82 part_name = "drivers_peripheral_camera" 83 } 84} 85