diff --git a/soong/Android.bp b/soong/Android.bp index 28c69fa2..3e7bd616 100644 --- a/soong/Android.bp +++ b/soong/Android.bp @@ -207,3 +207,24 @@ aapt_version_code { }, }, } + +soong_config_module_type { + name: "libcameraservice_ext_lib", + module_type: "cc_defaults", + config_namespace: "aospaGlobalVars", + value_variables: ["target_libcameraservice_ext_lib"], + properties: [ + "cppflags", + "whole_static_libs", + ], +} + +libcameraservice_ext_lib { + name: "libcameraservice_ext_lib_defaults", + soong_config_variables: { + target_libcameraservice_ext_lib: { + cppflags: ["-DTARGET_PROVIDES_CAMERA_PROVIDER_EXT_LIB"], + whole_static_libs: ["%s"], + }, + }, +} diff --git a/target/board/BoardConfigSoong.mk b/target/board/BoardConfigSoong.mk index f6b39ea7..1f5bf745 100644 --- a/target/board/BoardConfigSoong.mk +++ b/target/board/BoardConfigSoong.mk @@ -29,6 +29,7 @@ SOONG_CONFIG_aospaGlobalVars += \ target_health_charging_control_supports_toggle \ target_init_vendor_lib \ target_ld_shim_libs \ + target_libcameraservice_ext_lib \ target_process_sdk_version_override \ target_surfaceflinger_udfps_lib @@ -45,6 +46,7 @@ TARGET_HEALTH_CHARGING_CONTROL_SUPPORTS_DEADLINE ?= false TARGET_HEALTH_CHARGING_CONTROL_SUPPORTS_TOGGLE ?= true TARGET_INIT_VENDOR_LIB ?= vendor_init TARGET_SURFACEFLINGER_UDFPS_LIB ?= surfaceflinger_udfps_lib +TARGET_CAMERA_SERVICE_EXT_LIB ?= libcameraservice_ext_lib # Soong value variables SOONG_CONFIG_aospaGlobalVars_aapt_version_code := $(shell date -u +%Y%m%d) @@ -64,6 +66,7 @@ SOONG_CONFIG_aospaGlobalVars_target_health_charging_control_deadline_path := $(T SOONG_CONFIG_aospaGlobalVars_target_health_charging_control_supports_bypass := $(TARGET_HEALTH_CHARGING_CONTROL_SUPPORTS_BYPASS) SOONG_CONFIG_aospaGlobalVars_target_health_charging_control_supports_deadline := $(TARGET_HEALTH_CHARGING_CONTROL_SUPPORTS_DEADLINE) SOONG_CONFIG_aospaGlobalVars_target_health_charging_control_supports_toggle := $(TARGET_HEALTH_CHARGING_CONTROL_SUPPORTS_TOGGLE) +SOONG_CONFIG_aospaGlobalVars_target_libcameraservice_ext_lib := $(TARGET_CAMERA_SERVICE_EXT_LIB) # Gestures define add-gesturevar-if-exist