| # Copyright 2019 The Chromium OS Authors. All rights reserved. |
| # 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") |
| |
| pkg_config("cros_camera_common_pkg_config") { |
| pkg_deps = [ "libchrome" ] |
| } |
| |
| config("cros_camera_common") { |
| # CHROME_OS_CAMERA_BUILD_ENV is used to toggle the include path in header |
| # files imported from google3. |
| defines = [ "CHROME_OS_CAMERA_BUILD_ENV" ] |
| |
| # For camera libraries which are mounted at runtime. |
| lib_dirs = [ "${sysroot}/build/share/cros_camera" ] |
| ldflags = [ |
| # The path where libraries will be mount at runtime on the device. |
| "-Wl,-rpath=/usr/share/cros-camera/libfs/", |
| |
| # The path where libraries are temporarily installed on the host. It is |
| # mainly for tests (e.g. fuzzer/unit tests) running on the host device. |
| "-Wl,-rpath=/build/share/cros_camera/", |
| ] |
| |
| # Feature USE flags as declared in chromeos-base/cros-camera-libs. |
| defines += [ |
| "USE_CAMERA_FEATURE_AUTO_FRAMING=${use.camera_feature_auto_framing}", |
| "USE_CAMERA_FEATURE_FACE_DETECTION=${use.camera_feature_face_detection}", |
| "USE_CAMERA_FEATURE_HDRNET=${use.camera_feature_hdrnet}", |
| "USE_CAMERA_FEATURE_PORTRAIT_MODE=${use.camera_feature_portrait_mode}", |
| ] |
| |
| # Uncomment to enable DVLOGF*() logs. |
| # defines += [ "ENABLE_VERBOSE_DEBUG_LOGS" ] |
| |
| include_dirs = [ |
| "//camera", |
| "//camera/include", |
| ] |
| |
| configs = [ ":cros_camera_common_pkg_config" ] |
| } |