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.
13import("//build/ohos.gni")
14import("../../../camera.gni")
15
16config("device_manager_config") {
17  visibility = [ ":*" ]
18
19  cflags_cc = [
20    "-Wall",
21    "-Wextra",
22    "-Werror",
23    "-Wno-error",
24    "-DGST_DISABLE_DEPRECATED",
25    "-DHAVE_CONFIG_H",
26    "-DCOLORSPACE=\"videoconvert\"",
27    "-fno-strict-aliasing",
28    "-Wno-sign-compare",
29    "-Wno-builtin-requires-header",
30    "-Wno-unused-variable",
31    "-Wno-unused-label",
32    "-Wno-implicit-function-declaration",
33    "-Wno-format",
34    "-Wno-int-conversion",
35    "-Wno-unused-function",
36    "-Wno-thread-safety-attributes",
37    "-Wno-inconsistent-missing-override",
38    "-fno-rtti",
39    "-fno-exceptions",
40    "-ffunction-sections",
41    "-fdata-sections",
42  ]
43
44  include_dirs = [
45    "./include",
46    "$camera_path/adapter/platform/v4l2/src/device_manager/include",
47    "$camera_path/include",
48  ]
49}
50
51ohos_shared_library("peripheral_camera_device_manager") {
52  sources = [
53    "$camera_path/adapter/platform/v4l2/src/device_manager/enumerator_manager.cpp",
54    "$camera_path/adapter/platform/v4l2/src/device_manager/flash_controller.cpp",
55    "$camera_path/adapter/platform/v4l2/src/device_manager/flash_manager.cpp",
56    "$camera_path/adapter/platform/v4l2/src/device_manager/idevice_manager.cpp",
57    "$camera_path/adapter/platform/v4l2/src/device_manager/isp_controller.cpp",
58    "$camera_path/adapter/platform/v4l2/src/device_manager/isp_manager.cpp",
59    "$camera_path/adapter/platform/v4l2/src/device_manager/sensor_controller.cpp",
60    "$camera_path/adapter/platform/v4l2/src/device_manager/sensor_manager.cpp",
61    "$camera_path/device_manager/src/icontroller.cpp",
62    "$camera_path/device_manager/src/imanager.cpp",
63    "$camera_path/device_manager/src/isensor.cpp",
64  ]
65
66  include_dirs = [
67    "$camera_path/utils/event",
68    "$camera_path/adapter/platform/v4l2/src/device_manager/include",
69    "$camera_path/adapter/platform/v4l2/src/driver_adapter/include/",
70  ]
71
72  deps = [ "$camera_path/adapter/platform/v4l2/src/driver_adapter:peripheral_camera_v4l2_adapter" ]
73
74  if (is_standard_system) {
75    external_deps = [
76      "c_utils:utils",
77      "hdf_core:libhdf_utils",
78      "hilog:libhilog",
79    ]
80  } else {
81    external_deps = [
82      "c_utils:utils",
83      "hilog:libhilog",
84    ]
85  }
86  external_deps += [ "drivers_interface_camera:metadata" ]
87  public_configs = [ ":device_manager_config" ]
88  install_images = [ chipset_base_dir ]
89  subsystem_name = "hdf"
90  part_name = "drivers_peripheral_camera"
91}
92