• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 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/test.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_maintest") {
20  visibility = [ ":*" ]
21
22  cflags = [
23    "-DGST_DISABLE_DEPRECATED",
24    "-DHAVE_CONFIG_H",
25    "-DCOLORSPACE=\"videoconvert\"",
26  ]
27}
28
29ohos_executable("v4l2_main") {
30  install_enable = false
31  sources = [
32    "$camera_path/adapter/platform/v4l2/src/driver_adapter/main_test/v4l2_main.cpp",
33    "$camera_path/adapter/platform/v4l2/src/driver_adapter/src/v4l2_buffer.cpp",
34    "$camera_path/adapter/platform/v4l2/src/driver_adapter/src/v4l2_control.cpp",
35    "$camera_path/adapter/platform/v4l2/src/driver_adapter/src/v4l2_dev.cpp",
36    "$camera_path/adapter/platform/v4l2/src/driver_adapter/src/v4l2_fileformat.cpp",
37    "$camera_path/adapter/platform/v4l2/src/driver_adapter/src/v4l2_stream.cpp",
38    "$camera_path/adapter/platform/v4l2/src/driver_adapter/src/v4l2_uvc.cpp",
39  ]
40
41  include_dirs = [
42    "$board_camera_path/driver_adapter/test/v4l2_test/include",
43    "$camera_path/include",
44    "$camera_path/adapter/platform/v4l2/src/driver_adapter/include",
45  ]
46
47  external_deps = [
48    "c_utils:utils",
49    "drivers_interface_camera:metadata",
50    "hdf_core:libhdf_utils",
51    "hilog:libhilog",
52  ]
53  defines += [ "V4L2_MAIN_TEST" ]
54
55  public_configs = [ ":v4l2_maintest" ]
56  install_images = [ chipset_base_dir ]
57  subsystem_name = "kaihong_products"
58  part_name = "kaihong_products"
59}
60