1# Copyright (c) Huawei Technologies Co., Ltd. 2021. All rights reserved. 2import("//build/ohos.gni") 3import("//drivers/hdf_core/adapter/uhdf2/uhdf.gni") 4import("//drivers/peripheral/camera/hal/camera.gni") 5 6config("v4l2_config") { 7 visibility = [ ":*" ] 8 9 cflags = [ 10 "-DGST_DISABLE_DEPRECATED", 11 "-DHAVE_CONFIG_H", 12 "-DCOLORSPACE=\"videoconvert\"", 13 ] 14 15 if (enable_camera_device_utest) { 16 cflags += [ 17 "-fprofile-arcs", 18 "-ftest-coverage", 19 ] 20 21 ldflags = [ "--coverage" ] 22 } 23} 24 25ohos_shared_library("camera_v4l2_adapter") { 26 sources = [ 27 "src/v4l2_buffer.cpp", 28 "src/v4l2_control.cpp", 29 "src/v4l2_dev.cpp", 30 "src/v4l2_fileformat.cpp", 31 "src/v4l2_stream.cpp", 32 "src/v4l2_uvc.cpp", 33 ] 34 35 include_dirs = [ 36 "$camera_path/include", 37 "//drivers/peripheral/camera/hal/adapter/platform/v4l2/src/driver_adapter/include", 38 "//drivers/peripheral/camera/interfaces/metadata/include", 39 "//drivers/hdf_core/framework/include/utils", 40 "//drivers/hdf_core/adapter/uhdf2/osal/include", 41 ] 42 43 if (is_standard_system) { 44 external_deps = [ 45 "c_utils:utils", 46 "hiviewdfx_hilog_native:libhilog", 47 ] 48 } else { 49 external_deps = [ "hilog:libhilog" ] 50 } 51 52 public_configs = [ ":v4l2_config" ] 53 install_images = [ chipset_base_dir ] 54 subsystem_name = "hdf" 55 part_name = "drivers_peripheral_camera" 56} 57