• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2022 - 2024 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("//drivers/peripheral/distributed_camera/distributedcamera.gni")
16
17ohos_shared_library("libdistributed_camera_provider_config") {
18  sanitize = {
19    boundary_sanitize = true
20    cfi = true
21    cfi_cross_dso = true
22    debug = false
23    integer_overflow = true
24    ubsan = true
25  }
26  include_dirs =
27      [ "${distributedcamera_hdf_path}/hdi_service/include/dcamera_provider" ]
28  sources = [ "./src/config/dcamera_provider_config.cpp" ]
29  deps = [ "${distributedcamera_hdf_path}/hdi_service:libdistributed_camera_hdf_service_1.1" ]
30
31  ldflags = [
32    "-fpie",
33    "-Wl,-z,relro",
34    "-Wl,-z,now",
35  ]
36
37  external_deps = [
38    "cJSON:cjson",
39    "c_utils:utils",
40    "drivers_interface_camera:libbuffer_producer_sequenceable_1.0",
41    "drivers_interface_distributed_camera:libdistributed_camera_provider_stub_1.1",
42    "graphic_surface:surface",
43    "hdf_core:libhdf_host",
44    "hdf_core:libhdf_ipc_adapter",
45    "hdf_core:libhdf_utils",
46    "hdf_core:libhdi",
47    "hilog:libhilog",
48    "ipc:ipc_single",
49  ]
50
51  shlib_type = "hdi"
52  install_images = [ chipset_base_dir ]
53  subsystem_name = "hdf"
54  part_name = "drivers_peripheral_distributed_camera"
55}
56
57ohos_shared_library("libdistributed_camera_host_config") {
58  sanitize = {
59    boundary_sanitize = true
60    cfi = true
61    cfi_cross_dso = true
62    debug = false
63    integer_overflow = true
64    ubsan = true
65  }
66  include_dirs = [
67    "${distributedcamera_hdf_path}/hdi_service/include/dcamera_device",
68    "${distributedcamera_hdf_path}/hdi_service/include/dcamera_host",
69    "${distributedcamera_hdf_path}/hdi_service/include/dstream_operator",
70    "${distributedcamera_hdf_path}/hdi_service/include/utils",
71  ]
72  sources = [ "./src/config/dcamera_host_config.cpp" ]
73  deps = [ "${distributedcamera_hdf_path}/hdi_service:libdistributed_camera_hdf_service_1.1" ]
74  ldflags = [
75    "-fpie",
76    "-Wl,-z,relro",
77    "-Wl,-z,now",
78  ]
79  external_deps = [
80    "cJSON:cjson",
81    "c_utils:utils",
82    "drivers_interface_camera:libbuffer_producer_sequenceable_1.0",
83    "drivers_interface_camera:libcamera_stub_1.3",
84    "drivers_interface_camera:metadata",
85    "drivers_interface_display:libdisplay_composer_hdi_impl_1.3",
86    "drivers_interface_display:libdisplay_composer_proxy_1.0",
87    "drivers_interface_distributed_camera:libdistributed_camera_provider_stub_1.1",
88    "graphic_surface:buffer_handle",
89    "graphic_surface:surface",
90    "graphic_surface:sync_fence",
91    "hdf_core:libhdf_host",
92    "hdf_core:libhdf_ipc_adapter",
93    "hdf_core:libhdf_utils",
94    "hdf_core:libhdi",
95    "hilog:libhilog",
96    "ipc:ipc_single",
97  ]
98
99  shlib_type = "hdi"
100  install_images = [ chipset_base_dir ]
101  subsystem_name = "hdf"
102  part_name = "drivers_peripheral_distributed_camera"
103}
104
105ohos_shared_library("libdistributed_camera_hdf_service_1.1") {
106  sanitize = {
107    boundary_sanitize = true
108    cfi = true
109    cfi_cross_dso = true
110    debug = false
111    integer_overflow = true
112    ubsan = true
113  }
114  include_dirs = [
115    "include/dcamera_device",
116    "include/dcamera_host",
117    "include/dcamera_provider",
118    "include/dstream_operator",
119    "include/utils",
120  ]
121
122  sources = [
123    "src/dcamera_device/dcamera_device.cpp",
124    "src/dcamera_device/dmetadata_processor.cpp",
125    "src/dcamera_host/dcamera_host.cpp",
126    "src/dcamera_provider/dcamera_provider.cpp",
127    "src/dstream_operator/dbuffer_manager.cpp",
128    "src/dstream_operator/dcamera_stream.cpp",
129    "src/dstream_operator/dimage_buffer.cpp",
130    "src/dstream_operator/doffline_stream_operator.cpp",
131    "src/dstream_operator/dstream_operator.cpp",
132    "src/utils/anonymous_string.cpp",
133    "src/utils/dcamera.cpp",
134  ]
135
136  defines = [
137    "HI_LOG_ENABLE",
138    "DH_LOG_TAG=\"distributedcamerahdf\"",
139    "LOG_DOMAIN=0xD004150",
140  ]
141
142  ldflags = [
143    "-fpie",
144    "-Wl,-z,relro",
145    "-Wl,-z,now",
146  ]
147
148  external_deps = [
149    "cJSON:cjson",
150    "c_utils:utils",
151    "drivers_interface_camera:libbuffer_producer_sequenceable_1.0",
152    "drivers_interface_camera:libcamera_stub_1.3",
153    "drivers_interface_camera:metadata",
154    "drivers_interface_display:libdisplay_composer_hdi_impl_1.3",
155    "drivers_interface_display:libdisplay_composer_proxy_1.0",
156    "drivers_interface_distributed_camera:libdistributed_camera_provider_stub_1.1",
157    "graphic_surface:buffer_handle",
158    "graphic_surface:surface",
159    "graphic_surface:sync_fence",
160    "hdf_core:libhdf_host",
161    "hdf_core:libhdf_ipc_adapter",
162    "hdf_core:libhdf_utils",
163    "hdf_core:libhdi",
164    "hilog:libhilog",
165    "ipc:ipc_single",
166    "samgr:samgr_proxy",
167  ]
168
169  install_images = [ chipset_base_dir ]
170  subsystem_name = "hdf"
171  part_name = "drivers_peripheral_distributed_camera"
172}
173
174group("hdf_distributed_camera_service") {
175  deps = [
176    ":libdistributed_camera_hdf_service_1.1",
177    ":libdistributed_camera_host_config",
178    ":libdistributed_camera_provider_config",
179  ]
180}
181