1# Copyright (C) 2021–2023 Beijing OSWare Technology Co., Ltd 2# This file contains confidential and proprietary information of 3# OSWare Technology Co., Ltd 4# 5# Licensed under the Apache License, Version 2.0 (the "License"); 6# you may not use this file except in compliance with the License. 7# You may obtain a copy of the License at 8# 9# http://www.apache.org/licenses/LICENSE-2.0 10# 11# Unless required by applicable law or agreed to in writing, software 12# distributed under the License is distributed on an "AS IS" BASIS, 13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14# See the License for the specific language governing permissions and 15# limitations under the License. 16import("//build/ohos.gni") 17import("//device/board/${product_company}/${device_name}/device.gni") 18import("//drivers/hdf_core/adapter/uhdf2/uhdf.gni") 19import("//drivers/peripheral/camera/camera.gni") 20 21config("v4l2_config") { 22 visibility = [ ":*" ] 23 24 cflags = [ 25 "-Wall", 26 "-Wextra", 27 "-Werror", 28 "-Wno-error", 29 "-DGST_DISABLE_DEPRECATED", 30 "-DHAVE_CONFIG_H", 31 "-DCOLORSPACE=\"videoconvert\"", 32 "-fno-strict-aliasing", 33 "-Wno-sign-compare", 34 "-Wno-builtin-requires-header", 35 "-Wno-unused-variable", 36 "-Wno-unused-label", 37 "-Wno-implicit-function-declaration", 38 "-Wno-format", 39 "-Wno-int-conversion", 40 "-Wno-unused-function", 41 "-Wno-thread-safety-attributes", 42 "-Wno-inconsistent-missing-override", 43 "-fno-rtti", 44 "-fno-exceptions", 45 "-ffunction-sections", 46 "-fdata-sections", 47 ] 48 49 if (enable_camera_device_utest) { 50 cflags += [ 51 "-fprofile-arcs", 52 "-ftest-coverage", 53 ] 54 55 ldflags = [ "--coverage" ] 56 } 57} 58 59ohos_shared_library("camera_v4l2_adapter") { 60 sources = [ 61 "$camera_path/adapter/platform/v4l2/src/driver_adapter/src/v4l2_control.cpp", 62 "$camera_path/adapter/platform/v4l2/src/driver_adapter/src/v4l2_uvc.cpp", 63 "src/imx8mm_image_buffer.cpp", 64 "src/v4l2_buffer.cpp", 65 "src/v4l2_dev.cpp", 66 "src/v4l2_fileformat.cpp", 67 "src/v4l2_stream.cpp", 68 ] 69 70 include_dirs = [ 71 "$camera_path/include", 72 "$board_camera_path/driver_adapter/include", 73 "$camera_path/adapter/platform/v4l2/src/driver_adapter/include", 74 ] 75 76 if (is_standard_system) { 77 deps = [ "$hdf_uhdf_path/utils:libhdf_utils" ] 78 79 external_deps = [ 80 "c_utils:utils", 81 "hilog:libhilog", 82 ] 83 } else { 84 external_deps = [ "hilog:libhilog" ] 85 } 86 external_deps += [ "drivers_interface_camera:metadata" ] 87 public_configs = [ ":v4l2_config" ] 88 install_images = [ chipset_base_dir ] 89 subsystem_name = "osware_products" 90 part_name = "osware_products" 91} 92