• 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")
15import("//drivers/interface/camera/camera.gni")
16
17config("camera_metadata_config") {
18  include_dirs = [ "./include" ]
19}
20
21ohos_shared_library("metadata") {
22  branch_protector_ret = "pac_ret"
23
24  install_enable = true
25  cflags = [
26    "-fPIC",
27    "-Wall",
28  ]
29  cflags_cc = cflags
30  cflags_cc += [ "-fstack-protector-strong" ]
31
32  if (drivers_interface_camera_feature_coverage) {
33    cflags += [ "--coverage" ]
34    ldflags += [ "--coverage" ]
35  }
36  if (defined(ohos_lite)) {
37    sources = [
38      "src/camera_metadata_info.cpp",
39      "src/camera_metadata_operator.cpp",
40    ]
41    external_deps = [ "hilog_lite:hilog_shared" ]
42  } else {
43    sources = [
44      "src/camera_metadata_info.cpp",
45      "src/camera_metadata_operator.cpp",
46      "src/metadata_utils.cpp",
47    ]
48
49    if (drivers_interface_camera_feature_vendor_tag == true) {
50      defines = []
51      defines += [ "CAMERA_VENDOR_TAG" ]
52    }
53
54    deps = [ "../v1_0:libcamera_proxy_1.0" ]
55    external_deps = [
56      "c_utils:utils",
57      "hilog:libhilog",
58      "ipc:ipc_single",
59    ]
60  }
61
62  install_images = [ system_base_dir ]
63  innerapi_tags = [
64    "chipsetsdk",
65    "platformsdk_indirect",
66  ]
67  public_configs = [ ":camera_metadata_config" ]
68  part_name = "drivers_interface_camera"
69  subsystem_name = "hdf"
70}
71