• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) Huawei Technologies Co., Ltd. 2021. All rights reserved.
2
3import("../camera.gni")
4
5if (defined(ohos_lite)) {
6  import("//build/ohos.gni")
7  config("buffer_manager_config") {
8    visibility = [ ":*" ]
9    cflags = [
10      "-DGST_DISABLE_DEPRECATED",
11      "-DHAVE_CONFIG_H",
12    ]
13
14    cflags_cc = [ "-std=c++17" ]
15    ldflags = [ "-Wl" ]
16    ldflags += [ "--coverage" ]
17  }
18
19  ohos_shared_library("camera_buffer_manager") {
20    sources = [
21      "src/buffer_adapter/lite/buffer_adapter.cpp",
22      "src/buffer_allocator.cpp",
23      "src/buffer_allocator_factory.cpp",
24      "src/buffer_allocator_utils.cpp",
25      "src/buffer_loop_tracking.cpp",
26      "src/buffer_manager.cpp",
27      "src/buffer_pool.cpp",
28      "src/buffer_tracking.cpp",
29      "src/heap_buffer_allocator/heap_buffer_allocator.cpp",
30      "src/image_buffer.cpp",
31    ]
32
33    include_dirs = [
34      "include",
35      "$camera_path/include",
36      "src/buffer_adapter/lite",
37      "//commonlibrary/utils_lite/include",
38      "//base/hiviewdfx/interfaces/innerkits/libhilog/include",
39      "//drivers/peripheral/display/interfaces/include",
40      "//drivers/peripheral/base",
41      "//drivers/hdf_core/framework/include/utils",
42      "//drivers/hdf_core/adapter/uhdf2/osal/include",
43    ]
44
45    libs = []
46    defines = []
47    deps = [
48      "//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared",
49      "//foundation/graphic/surface:surface",
50    ]
51    external_deps = [ "drivers_peripheral_display:hdi_display" ]
52
53    public_configs = [ ":buffer_manager_config" ]
54    subsystem_name = "hdf"
55    part_name = "drivers_peripheral_camera"
56  }
57} else {
58  import("//build/ohos.gni")
59  config("buffer_manager_config") {
60    visibility = [ ":*" ]
61
62    cflags = [
63      "-DGST_DISABLE_DEPRECATED",
64      "-DHAVE_CONFIG_H",
65    ]
66
67    ldflags = [ "-Wl" ]
68
69    if (enable_camera_device_utest) {
70      cflags += [
71        "-fprofile-arcs",
72        "-ftest-coverage",
73      ]
74
75      ldflags += [ "--coverage" ]
76    }
77  }
78
79  ohos_shared_library("camera_buffer_manager") {
80    sources = [
81      "src/buffer_adapter/standard/buffer_adapter.cpp",
82      "src/buffer_allocator.cpp",
83      "src/buffer_allocator_factory.cpp",
84      "src/buffer_allocator_utils.cpp",
85      "src/buffer_loop_tracking.cpp",
86      "src/buffer_manager.cpp",
87      "src/buffer_pool.cpp",
88      "src/buffer_tracking.cpp",
89      "src/gralloc_buffer_allocator/gralloc_buffer_allocator.cpp",
90      "src/heap_buffer_allocator/heap_buffer_allocator.cpp",
91      "src/image_buffer.cpp",
92    ]
93
94    include_dirs = [
95      "include",
96      "src/buffer_adapter/standard",
97      "$camera_path/include",
98      "//drivers/peripheral/camera/interfaces/metadata/include",
99      "//drivers/hdf_core/framework/include/utils",
100      "//drivers/hdf_core/adapter/uhdf2/osal/include",
101    ]
102
103    libs = []
104
105    defines = []
106
107    if (enable_camera_device_utest) {
108      defines += [ "CAMERA_DEVICE_UTEST" ]
109    }
110
111    if (is_standard_system) {
112      external_deps = [
113        "c_utils:utils",
114        "drivers_peripheral_display:hdi_display_gralloc",
115        "graphic_chipsetsdk:surface",
116        "hiviewdfx_hilog_native:libhilog",
117      ]
118    } else {
119      external_deps = [ "hilog:libhilog" ]
120    }
121
122    public_configs = [ ":buffer_manager_config" ]
123    install_images = [ chipset_base_dir ]
124    subsystem_name = "hdf"
125    part_name = "drivers_peripheral_camera"
126  }
127}
128