blob: 6f3f13c94aeedd87ca10ebb7e725e9c3a0dbb589 [file] [log] [blame] [edit]
# Copyright 2019 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")
pkg_config("cros_camera_common_pkg_config") {
pkg_deps = [
# libchrome is used by nearly all components.
"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/",
]
if (use.camera_angle_backend) {
ldflags += [
# Link with the camera GL Loader library to be able to select to correct
# GL library depending on the camera-angle-backend chrome flag.
"-Wl,-rpath=${libdir}/camera_gl_loader",
]
}
# Feature USE flags as declared in chromeos-base/cros-camera-libs.
defines += [
"USE_ARCVM=${use.arcvm}",
"USE_CAMERA_DIAGNOSTICS=${use.camera_diagnostics}",
"USE_CAMERA_FEATURE_AUTO_FRAMING=${use.camera_feature_auto_framing}",
"USE_CAMERA_FEATURE_EFFECTS=${use.camera_feature_effects}",
"USE_CAMERA_FEATURE_FACE_DETECTION=${use.camera_feature_face_detection}",
"USE_CAMERA_FEATURE_FRAME_ANNOTATOR=${use.camera_feature_frame_annotator}",
"USE_CAMERA_FEATURE_HDRNET=${use.camera_feature_hdrnet}",
"USE_CAMERA_FEATURE_PORTRAIT_MODE=${use.camera_feature_portrait_mode}",
"USE_CAMERA_FEATURE_SUPER_RES=${use.camera_feature_super_res}",
"USE_IPU6=${use.ipu6}",
"USE_IPU6EPADLN=${use.ipu6epadln}",
"USE_IPU6EP=${use.ipu6ep}",
"USE_IPU6EPMTL=${use.ipu6epmtl}",
"USE_CAMERA_ANGLE_BACKEND=${use.camera_angle_backend}",
"USE_QUALCOMM_CAMX=${use.qualcomm_camx}",
]
# Uncomment to enable DVLOGF*() logs.
# defines += [ "ENABLE_VERBOSE_DEBUG_LOGS" ]
include_dirs = [
"//camera",
"//camera/include",
]
configs = [ ":cros_camera_common_pkg_config" ]
}