• 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
14if (defined(ohos_lite)) {
15  import("//build/ohos.gni")
16  import("../../../../../hdf_core/adapter/uhdf/uhdf.gni")
17  import("../../../camera.gni")
18  config("utils_config") {
19    visibility = [ ":*" ]
20    cflags = [
21      "-DGST_DISABLE_DEPRECATED",
22      "-DHAVE_CONFIG_H",
23      "-DCOLORSPACE=\"videoconvert\"",
24    ]
25    cflags_cc = [ "-std=c++17" ]
26  }
27
28  ohos_shared_library("camera_utils") {
29    sources = [ "watchdog/watchdog.cpp" ]
30    include_dirs = [ "watchdog" ]
31    libs = []
32    defines = []
33    deps = []
34    public_configs = [ ":utils_config" ]
35    subsystem_name = "hdf"
36    part_name = "drivers_peripheral_camera"
37  }
38} else {
39  import("//build/ohos.gni")
40  import("../../../camera.gni")
41  config("utils_config") {
42    visibility = [ ":*" ]
43    cflags = [
44      "-DGST_DISABLE_DEPRECATED",
45      "-DHAVE_CONFIG_H",
46      "-DCOLORSPACE=\"videoconvert\"",
47    ]
48  }
49  ohos_shared_library("camera_utils") {
50    sources = [
51      "exif/exif_utils.cpp",
52      "watchdog/watchdog.cpp",
53    ]
54    include_dirs = [
55      "$camera_path/include",
56      "//third_party/libexif",
57      "watchdog",
58      "exif",
59    ]
60    libs = []
61    defines = []
62    deps = [ "//third_party/libexif:libexif" ]
63
64    external_deps = [
65      "c_utils:utils",
66      "drivers_interface_camera:metadata",
67      "hdf_core:libhdf_utils",
68      "hilog:libhilog",
69    ]
70    if (enable_camera_device_utest) {
71      defines += [ "CAMERA_DEVICE_UTEST" ]
72    }
73    public_configs = [ ":utils_config" ]
74    install_images = [ chipset_base_dir ]
75    subsystem_name = "hdf"
76    part_name = "drivers_peripheral_camera"
77  }
78}
79