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("//device/board/${product_company}/${device_name}/device.gni") 16import("//drivers/hdf_core/adapter/uhdf2/uhdf.gni") 17import("//drivers/peripheral/camera/camera.gni") 18 19config("v4l2_config") { 20 visibility = [ ":*" ] 21 22 cflags = [ 23 "-Wall", 24 "-Wextra", 25 "-Werror", 26 "-Wno-error", 27 "-DGST_DISABLE_DEPRECATED", 28 "-DHAVE_CONFIG_H", 29 "-DCOLORSPACE=\"videoconvert\"", 30 "-fno-strict-aliasing", 31 "-Wno-sign-compare", 32 "-Wno-builtin-requires-header", 33 "-Wno-unused-variable", 34 "-Wno-unused-label", 35 "-Wno-implicit-function-declaration", 36 "-Wno-format", 37 "-Wno-int-conversion", 38 "-Wno-unused-function", 39 "-Wno-thread-safety-attributes", 40 "-Wno-inconsistent-missing-override", 41 "-fno-rtti", 42 "-fno-exceptions", 43 "-ffunction-sections", 44 "-fdata-sections", 45 ] 46 47 if (enable_camera_device_utest) { 48 cflags += [ 49 "-fprofile-arcs", 50 "-ftest-coverage", 51 ] 52 53 ldflags = [ "--coverage" ] 54 } 55} 56 57ohos_shared_library("camera_v4l2_adapter") { 58 sources = [ 59 "src/v4l2_buffer.cpp", 60 "src/v4l2_control.cpp", 61 "src/v4l2_dev.cpp", 62 "src/v4l2_fileformat.cpp", 63 "src/v4l2_stream.cpp", 64 "src/v4l2_uvc.cpp", 65 ] 66 67 include_dirs = [ 68 "$camera_path/include", 69 "include", 70 "//drivers/peripheral/camera/interfaces/metadata/include", 71 "//device/soc/amlogic/a311d/hardware/ge2d/include", 72 ] 73 74 if (is_standard_system) { 75 external_deps = [ 76 "c_utils:utils", 77 "hdf_core:libhdf_utils", 78 "hilog:libhilog", 79 ] 80 } else { 81 external_deps = [ "hilog:libhilog" ] 82 } 83 external_deps += [ "drivers_interface_camera:metadata" ] 84 public_deps = [ "//device/soc/amlogic/a311d/hardware/ge2d:libge2d" ] 85 86 public_configs = [ ":v4l2_config" ] 87 install_images = [ chipset_base_dir ] 88 subsystem_name = "unionman_products" 89 part_name = "unionman_products" 90} 91