1# Copyright (c) 2021 - 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/ohos.gni")
15import("../../../../hdf_core/adapter/uhdf2/uhdf.gni")
16import("../camera.gni")
17
18config("hdi_cif_config") {
19  visibility = [ ":*" ]
20
21  cflags = [
22    "-DGST_DISABLE_DEPRECATED",
23    "-DHAVE_CONFIG_H",
24  ]
25
26  ldflags = [ "-Wl" ]
27}
28
29ohos_shared_library("hdi_cif") {
30  sources = [
31    "$camera_path/../interfaces/hdi_cpp/callback/device/src/camera_device_callback_proxy.cpp",
32    "$camera_path/../interfaces/hdi_cpp/callback/host/src/camera_host_callback_proxy.cpp",
33    "$camera_path/../interfaces/hdi_cpp/callback/operator/src/stream_operator_callback_proxy.cpp",
34    "$camera_path/../interfaces/hdi_cpp/server/src/camera_device_stub.cpp",
35    "$camera_path/../interfaces/hdi_cpp/server/src/camera_host_driver.cpp",
36    "$camera_path/../interfaces/hdi_cpp/server/src/camera_host_stub.cpp",
37    "$camera_path/../interfaces/hdi_cpp/server/src/offline_stream_operator_stub.cpp",
38    "$camera_path/../interfaces/hdi_cpp/server/src/stream_operator_stub.cpp",
39    "./src/buffer_producer_wrapper.cpp",
40    "./src/camera_device.cpp",
41    "./src/camera_device_callback_wrapper.cpp",
42    "./src/camera_host.cpp",
43    "./src/camera_host_callback_wrapper.cpp",
44    "./src/offline_stream_operator.cpp",
45    "./src/stream_operator.cpp",
46    "./src/stream_operator_callback_wrapper.cpp",
47  ]
48
49  include_dirs = [
50    "$camera_path/../interfaces/include",
51    "$camera_path/../interfaces/hdi_cpp/client/include",
52    "$camera_path/../interfaces/hdi_cpp/server/include",
53    "$camera_path/../interfaces/hdi_cpp/callback/host/include",
54    "$camera_path/../interfaces/hdi_cpp/callback/device/include",
55    "$camera_path/../interfaces/hdi_cpp/callback/operator/include",
56    "$camera_path/include",
57    "$camera_path/hdi_cif/include",
58    "$camera_path/hdi_cif/src/include",
59  ]
60
61  deps = []
62
63  if (is_standard_system) {
64    external_deps = [
65      "c_utils:utils",
66      "hdf_core:libhdf_host",
67      "hdf_core:libhdf_ipc_adapter",
68      "hdf_core:libhdf_utils",
69      "hdf_core:libhdi",
70      "hilog:libhilog",
71      "ipc:ipc_single",
72    ]
73  } else {
74    external_deps = [ "hilog:libhilog" ]
75  }
76  external_deps += [
77    "drivers_interface_camera:metadata",
78    "ipc:ipc_single",
79  ]
80
81  public_configs = [ ":hdi_cif_config" ]
82  install_images = [ chipset_base_dir ]
83  subsystem_name = "hdf"
84  part_name = "drivers_peripheral_camera"
85}
86