• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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.
13
14import("//build/ohos.gni")
15import("./../../../multimedia_camera_framework.gni")
16
17config("camera_ndk_config") {
18  include_dirs = [
19    "${multimedia_camera_framework_path}/interfaces/inner_api/native/camera/include",
20    "${multimedia_camera_framework_path}/interfaces/kits/native/include/camera",
21  ]
22
23  cflags = [
24    "-Wall",
25    "-Werror",
26  ]
27}
28
29ohos_shared_library("ohcamera") {
30  branch_protector_ret = "pac_ret"
31  sanitize = {
32    cfi = true
33    cfi_cross_dso = true
34    debug = false
35  }
36
37  include_dirs = [
38    "${driver_disply_path}/interfaces/include",
39    "${graphic_surface_path}/surface/include",
40    "${multimedia_camera_framework_path}/interfaces",
41    "${multimedia_camera_framework_path}/interfaces/kits/native/include/camera",
42    "${multimedia_camera_framework_path}/services/camera_service/include",
43  ]
44
45  configs = [ ":camera_ndk_config" ]
46
47  sources = [
48    "./camera_input.cpp",
49    "./camera_manager.cpp",
50    "./capture_session.cpp",
51    "./metadata_output.cpp",
52    "./photo_output.cpp",
53    "./preview_output.cpp",
54    "./video_output.cpp",
55    "impl/camera_input_impl.cpp",
56    "impl/camera_manager_impl.cpp",
57    "impl/camera_util.cpp",
58    "impl/capture_session_impl.cpp",
59    "impl/metadata_output_impl.cpp",
60    "impl/photo_output_impl.cpp",
61    "impl/preview_output_impl.cpp",
62    "impl/video_output_impl.cpp",
63  ]
64
65  deps = [ "${multimedia_camera_framework_path}/frameworks/native/camera:camera_framework" ]
66
67  cflags = [ "-Werror" ]
68
69  external_deps = [
70    "c_utils:utils",
71    "graphic_surface:surface",
72    "hilog:libhilog",
73    "hisysevent:libhisysevent",
74    "hitrace:hitrace_meter",
75    "image_framework:image",
76    "image_framework:image_native",
77    "ipc:ipc_core",
78  ]
79
80  innerapi_tags = [ "ndk" ]
81
82  output_extension = "so"
83  subsystem_name = "multimedia"
84  part_name = "camera_framework"
85}
86