• 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    include_dirs = [ "watchdog" ]
27  }
28
29  ohos_shared_library("peripheral_camera_utils") {
30    sources = [ "watchdog/watchdog.cpp" ]
31    include_dirs = []
32    libs = []
33    defines = []
34    deps = []
35    public_configs = [ ":utils_config" ]
36    subsystem_name = "hdf"
37    part_name = "drivers_peripheral_camera"
38  }
39} else {
40  import("//build/ohos.gni")
41  import("../../../camera.gni")
42  config("utils_config") {
43    visibility = [ ":*" ]
44    cflags = [
45      "-DGST_DISABLE_DEPRECATED",
46      "-DHAVE_CONFIG_H",
47      "-DCOLORSPACE=\"videoconvert\"",
48    ]
49    include_dirs = [
50      "event",
51      "exif",
52      "watchdog",
53    ]
54  }
55  ohos_shared_library("peripheral_camera_utils") {
56    sources = [
57      "event/camera_hal_hisysevent.cpp",
58      "exif/exif_utils.cpp",
59      "hicollie/camera_hal_hicollie.cpp",
60      "watchdog/watchdog.cpp",
61    ]
62    include_dirs = [
63      "$camera_path/include",
64      "$camera_path/utils/event",
65      "$camera_path/utils/hicollie",
66    ]
67    libs = []
68    defines = []
69
70    external_deps = [
71      "c_utils:utils",
72      "drivers_interface_camera:metadata",
73      "hdf_core:libhdf_utils",
74      "hicollie:libhicollie",
75      "hilog:libhilog",
76      "hisysevent:libhisysevent",
77      "libexif:libexif",
78    ]
79    if (enable_camera_device_utest) {
80      defines += [ "CAMERA_DEVICE_UTEST" ]
81    }
82    public_configs = [ ":utils_config" ]
83    install_images = [ chipset_base_dir ]
84    subsystem_name = "hdf"
85    part_name = "drivers_peripheral_camera"
86  }
87}
88