| # Copyright 2024 The ChromiumOS Authors |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| import("//common-mk/pkg_config.gni") |
| |
| group("all") { |
| deps = [ ":libhardware_buffer" ] |
| if (use.test) { |
| deps += [ "//camera/hardware_buffer/tests:all" ] |
| } |
| } |
| |
| pkg_config("target_defaults") { |
| configs = [ "//camera/build:cros_camera_common" ] |
| pkg_deps = [ |
| "gbm", |
| "libdrm", |
| ] |
| } |
| |
| source_set("hardware_buffer") { |
| sources = [ |
| "//camera/hardware_buffer/allocator.cc", |
| "//camera/hardware_buffer/dmabuf_heap_allocator.cc", |
| "//camera/hardware_buffer/minigbm_allocator.cc", |
| ] |
| |
| public_configs = [ ":target_defaults" ] |
| |
| # -fPIC needed by the libcros_camera.so shared library. |
| configs += [ "//common-mk:pic" ] |
| } |
| |
| shared_library("libhardware_buffer") { |
| output_name = "libhardware_buffer" |
| configs += [ ":target_defaults" ] |
| install_path = "lib" |
| deps = [ ":hardware_buffer" ] |
| } |