• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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")
15
16config("camera_framework_public_config") {
17  include_dirs = [
18    "//foundation/multimedia/camera_framework/interfaces/inner_api/native/camera/include",
19    "//foundation/multimedia/camera_framework/interfaces/inner_api/native/camera/include/input",
20    "//foundation/multimedia/camera_framework/interfaces/inner_api/native/camera/include/output",
21    "//foundation/multimedia/camera_framework/interfaces/inner_api/native/camera/include/session",
22    "../interfaces/inner_api/native/camera/include/mode",
23  ]
24}
25
26config("camera_framework_local_config") {
27  include_dirs = [
28    "//foundation/multimedia/camera_framework/services/camera_service/include",
29    "//foundation/multimedia/camera_framework/services/camera_service/binder/base/include",
30    "//foundation/multimedia/camera_framework/services/camera_service/binder/client/include",
31    "//foundation/multimedia/camera_framework/services/camera_service/binder/server/include",
32    "//foundation/multimedia/camera_framework/interfaces/inner_api/native/camera/include",
33  ]
34}
35
36config("camera_framework_drivers_config") {
37  include_dirs = [
38    "//drivers/peripheral/camera/interfaces/include",
39    "//drivers/peripheral/camera/interfaces/hdi_ipc",
40    "//drivers/peripheral/camera/interfaces/hdi_ipc/server",
41  ]
42}
43
44ohos_shared_library("camera_framework") {
45  install_enable = true
46  sources = [
47    "//foundation/multimedia/camera_framework/services/camera_service/binder/base/src/icamera_util.cpp",
48    "//foundation/multimedia/camera_framework/services/camera_service/binder/client/src/hcamera_device_proxy.cpp",
49    "//foundation/multimedia/camera_framework/services/camera_service/binder/client/src/hcamera_service_proxy.cpp",
50    "//foundation/multimedia/camera_framework/services/camera_service/binder/client/src/hcapture_session_proxy.cpp",
51    "//foundation/multimedia/camera_framework/services/camera_service/binder/client/src/hstream_capture_proxy.cpp",
52    "//foundation/multimedia/camera_framework/services/camera_service/binder/client/src/hstream_metadata_proxy.cpp",
53    "//foundation/multimedia/camera_framework/services/camera_service/binder/client/src/hstream_repeat_proxy.cpp",
54    "//foundation/multimedia/camera_framework/services/camera_service/binder/server/src/hcamera_device_callback_stub.cpp",
55    "//foundation/multimedia/camera_framework/services/camera_service/binder/server/src/hcamera_listener_stub.cpp",
56    "//foundation/multimedia/camera_framework/services/camera_service/binder/server/src/hcamera_service_callback_stub.cpp",
57    "//foundation/multimedia/camera_framework/services/camera_service/binder/server/src/hcapture_session_callback_stub.cpp",
58    "//foundation/multimedia/camera_framework/services/camera_service/binder/server/src/hstream_capture_callback_stub.cpp",
59    "//foundation/multimedia/camera_framework/services/camera_service/binder/server/src/hstream_repeat_callback_stub.cpp",
60    "src/input/camera_device.cpp",
61    "src/input/camera_input.cpp",
62    "src/input/camera_manager.cpp",
63    "src/input/capture_input.cpp",
64    "src/input/prelaunch_config.cpp",
65    "src/mode/mode_manager.cpp",
66    "src/output/camera_output_capability.cpp",
67    "src/output/capture_output.cpp",
68    "src/output/metadata_output.cpp",
69    "src/output/photo_output.cpp",
70    "src/output/preview_output.cpp",
71    "src/output/video_output.cpp",
72    "src/session/capture_session.cpp",
73    "src/session/portrait_session.cpp",
74  ]
75
76  cflags = [
77    "-fPIC",
78    "-Wall",
79    "-DSUPPORT_CAMERA_AUTH",
80  ]
81  if (target_cpu == "arm") {
82    cflags += [ "-DBINDER_IPC_32BIT" ]
83  }
84  sanitize = {
85    cfi = true
86    cfi_cross_dso = true
87    debug = false
88    blocklist = "../../../cfi_blocklist.txt"
89  }
90
91  public_configs = [
92    ":camera_framework_public_config",
93    ":camera_framework_local_config",
94    ":camera_framework_drivers_config",
95  ]
96
97  include_dirs = [
98    "//foundation/graphic/graphic_2d/frameworks/surface/include",
99    "//utils/system/safwk/native/include",
100  ]
101
102  external_deps = [
103    "c_utils:utils",
104    "device_manager:devicemanagersdk",
105    "drivers_interface_camera:libcamera_proxy_1.0",
106    "drivers_interface_camera:metadata",
107    "graphic_2d:surface",
108    "hilog:libhilog",
109    "hisysevent:libhisysevent",
110    "hitrace:hitrace_meter",
111    "image_framework:image_native",
112    "ipc:ipc_core",
113    "safwk:system_ability_fwk",
114    "samgr:samgr_proxy",
115  ]
116
117  cflags_cc = cflags
118
119  innerapi_tags = [ "platformsdk" ]
120  part_name = "camera_framework"
121  subsystem_name = "multimedia"
122}
123