• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_maintest") {
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
50ohos_executable("v4l2_main") {
51  install_enable = true
52  sources = [
53    "$board_camera_path/driver_adapter/src/imx8mm_image_buffer.cpp",
54    "$board_camera_path/driver_adapter/src/v4l2_buffer.cpp",
55    "$board_camera_path/driver_adapter/src/v4l2_dev.cpp",
56    "$board_camera_path/driver_adapter/src/v4l2_fileformat.cpp",
57    "$board_camera_path/driver_adapter/src/v4l2_stream.cpp",
58    "$camera_path/adapter/platform/v4l2/src/driver_adapter/src/v4l2_control.cpp",
59    "$camera_path/adapter/platform/v4l2/src/driver_adapter/src/v4l2_uvc.cpp",
60    "./v4l2_main.cpp",
61  ]
62
63  include_dirs = [
64    "$board_camera_path/driver_adapter/main_test",
65    "$camera_path/include",
66    "$board_camera_path/driver_adapter/include",
67  ]
68
69  deps = [ "$hdf_uhdf_path/utils:libhdf_utils" ]
70
71  external_deps = [
72    "c_utils:utils",
73    "hilog:libhilog",
74  ]
75  defines += [ "V4L2_MAIN_TEST" ]
76
77  install_enable = true
78  public_configs = [ ":v4l2_maintest" ]
79  install_images = [ chipset_base_dir ]
80  subsystem_name = "osware_products"
81  part_name = "osware_products"
82}
83