# Copyright (c) 2023 Shenzhen Kaihong Digital Industry Development Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("//build/test.gni") import("//device/board/${product_company}/${device_name}/device.gni") import("//drivers/hdf_core/adapter/uhdf2/uhdf.gni") import("//drivers/peripheral/camera/camera.gni") config("v4l2_config") { visibility = [ ":*" ] cflags = [ "-DGST_DISABLE_DEPRECATED", "-DHAVE_CONFIG_H", "-DCOLORSPACE=\"videoconvert\"", ] if (enable_camera_device_utest) { cflags += [ "-fprofile-arcs", "-ftest-coverage", ] ldflags = [ "--coverage" ] } } ohos_shared_library("camera_v4l2_adapter") { sources = [ "$camera_path/adapter/platform/v4l2/src/driver_adapter/src/v4l2_buffer.cpp", "$camera_path/adapter/platform/v4l2/src/driver_adapter/src/v4l2_control.cpp", "$camera_path/adapter/platform/v4l2/src/driver_adapter/src/v4l2_dev.cpp", "$camera_path/adapter/platform/v4l2/src/driver_adapter/src/v4l2_fileformat.cpp", "$camera_path/adapter/platform/v4l2/src/driver_adapter/src/v4l2_stream.cpp", "$camera_path/adapter/platform/v4l2/src/driver_adapter/src/v4l2_uvc.cpp", ] include_dirs = [ "$camera_path/include", "$camera_path/adapter/platform/v4l2/src/driver_adapter/include", ] if (is_standard_system) { external_deps = [ "c_utils:utils", "hdf_core:libhdf_utils", "hilog:libhilog", ] } else { external_deps = [ "hilog:libhilog" ] } external_deps += [ "drivers_interface_camera:metadata" ] public_configs = [ ":v4l2_config" ] install_images = [ chipset_base_dir ] subsystem_name = "kaihong_products" part_name = "kaihong_products" }