# Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("../../../camera.gni") if (defined(ohos_lite)) { import("//build/ohos.gni") config("buffer_manager_config") { visibility = [ ":*" ] cflags = [ "-DGST_DISABLE_DEPRECATED", "-DHAVE_CONFIG_H", ] cflags_cc = [ "-std=c++17" ] ldflags = [ "-Wl" ] ldflags += [ "--coverage" ] } ohos_shared_library("camera_buffer_manager") { sources = [ "./src/buffer_adapter/lite/buffer_adapter.cpp", "./src/buffer_allocator.cpp", "./src/buffer_allocator_factory.cpp", "./src/buffer_allocator_utils.cpp", "./src/buffer_loop_tracking.cpp", "./src/buffer_manager.cpp", "./src/buffer_pool.cpp", "./src/buffer_tracking.cpp", "./src/heap_buffer_allocator/heap_buffer_allocator.cpp", "./src/image_buffer.cpp", ] include_dirs = [ "./include", "$camera_path/include", "./src/buffer_adapter/lite", "$camera_path/../../display/interfaces/include", "$camera_path/../../base", ] libs = [] defines = [] deps = [] external_deps = [ "drivers_peripheral_display:hdi_display", "graphic_chipsetsdk:surface", "hdf_core:libhdf_utils", "hilog_featured_lite:hilog_shared", ] public_configs = [ ":buffer_manager_config" ] subsystem_name = "hdf" part_name = "drivers_peripheral_camera" } } else { import("//build/ohos.gni") config("buffer_manager_config") { visibility = [ ":*" ] cflags = [ "-DGST_DISABLE_DEPRECATED", "-DHAVE_CONFIG_H", ] ldflags = [ "-Wl" ] if (enable_camera_device_utest) { cflags += [ "-fprofile-arcs", "-ftest-coverage", ] ldflags += [ "--coverage" ] } } ohos_shared_library("camera_buffer_manager") { sources = [ "./src/buffer_adapter/standard/buffer_adapter.cpp", "./src/buffer_allocator.cpp", "./src/buffer_allocator_factory.cpp", "./src/buffer_allocator_utils.cpp", "./src/buffer_loop_tracking.cpp", "./src/buffer_manager.cpp", "./src/buffer_pool.cpp", "./src/buffer_tracking.cpp", "./src/heap_buffer_allocator/heap_buffer_allocator.cpp", "./src/image_buffer.cpp", ] include_dirs = [ "./include", "./src/buffer_adapter/standard", "$camera_path/include", ] libs = [] defines = [] if (enable_camera_device_utest) { defines += [ "CAMERA_DEVICE_UTEST" ] } if (is_standard_system) { external_deps = [ "c_utils:utils", "graphic_chipsetsdk:surface", "hdf_core:libhdf_utils", "hilog:libhilog", ] } else { external_deps = [ "hilog:libhilog" ] } external_deps += [ "drivers_interface_camera:metadata" ] public_configs = [ ":buffer_manager_config" ] install_images = [ chipset_base_dir ] subsystem_name = "hdf" part_name = "drivers_peripheral_camera" } }