• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2021 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/adapter/uhdf2/uhdf.gni")
16import(
17    "//foundation/distributedhardware/distributedcamera/distributedcamera.gni")
18
19ohos_executable("dcamera_hdi_sample") {
20  install_enable = false
21  sources = [
22    "common.cpp",
23    "dcamera_hdi_sample.cpp",
24  ]
25
26  include_dirs = [
27    "${distributedcamera_hdf_path}/interfaces/include",
28    "${distributedcamera_hdf_path}/interfaces/hdi_ipc/client/device",
29    "${distributedcamera_hdf_path}/interfaces/hdi_ipc/client/host",
30    "${distributedcamera_hdf_path}/interfaces/hdi_ipc/client/operator",
31    "${distributedcamera_hdf_path}/interfaces/hdi_ipc/client/provider",
32    "${distributedcamera_hdf_path}/interfaces/hdi_ipc/server/device",
33    "${distributedcamera_hdf_path}/interfaces/hdi_ipc/server/host",
34    "${distributedcamera_hdf_path}/interfaces/hdi_ipc/server/operator",
35    "${distributedcamera_hdf_path}/interfaces/hdi_ipc/server/provider",
36    "${distributedcamera_hdf_path}/hdi_impl/include/dcamera_device",
37    "${distributedcamera_hdf_path}/hdi_impl/include/dcamera_host",
38    "${distributedcamera_hdf_path}/hdi_impl/include/dcamera_provider",
39    "${distributedcamera_hdf_path}/hdi_impl/include/dstream_operator",
40    "${distributedcamera_hdf_path}/hdi_impl/include/utils",
41    "${fwk_common_path}/log/include",
42    "${fwk_common_path}/utils/include/",
43    "${common_path}/include/constants",
44    "${fwk_utils_path}/include",
45    "${fwk_utils_path}/include/log",
46    "${hdf_framework_path}/include/utils",
47    "${hdf_uhdf_path}/include/hdi",
48    "${hdf_uhdf_path}/osal/include",
49
50    #producer
51    "//foundation/graphic/standard/frameworks/surface/include",
52    "//foundation/graphic/standard/interfaces/kits/surface",
53    "//foundation/graphic/standard/utils/include",
54    "//foundation/communication/ipc/ipc/native/src/core/include",
55    "//drivers/peripheral/camera/interfaces/metadata/include",
56
57    "${innerkits_path}/native_cpp/camera_source/include",
58    "${innerkits_path}/native_cpp/camera_source/include/callback",
59    "${fwk_common_path}/utils/include",
60  ]
61
62  cflags = [
63    "-fPIC",
64    "-Wall",
65  ]
66
67  if (device_name == "baltimore") {
68    cflags += [ "-DBALTIMORE_CAMERA" ]
69    include_dirs += [ "${camera_hdf_path_baltimore}/camera/interfaces/include" ]
70  } else {
71    include_dirs += [
72      "${camera_hdf_path}/camera/interfaces/include",
73      "${camera_hdf_path}/camera/interfaces/hdi_ipc",
74    ]
75  }
76
77  deps = [
78    "${distributedcamera_hdf_path}/interfaces/hdi_ipc/client:distributed_camera_hdf_client",
79    "${fwk_utils_path}:distributedhardwareutils",
80    "${fwk_utils_path}:distributedhardwareutils",
81    "${hdf_uhdf_path}/hdi:libhdi",
82    "${innerkits_path}/native_cpp/camera_source:distributed_camera_source_sdk",
83    "//drivers/peripheral/camera/interfaces/metadata:metadata",
84    "//drivers/peripheral/display/hal:hdi_display_gralloc",
85    "//foundation/graphic/standard/frameworks/surface:surface",
86  ]
87
88  external_deps = [
89    "hiviewdfx_hilog_native:libhilog",
90    "ipc:ipc_single",
91    "samgr_standard:samgr_proxy",
92  ]
93
94  cflags_cc = cflags
95  part_name = "distributed_camera"
96  subsystem_name = "distributedhardware"
97}
98