feat(cmakev2/compat): allow to set commonly required components

The commonly required components are configured solely for backward
compatibility with cmakev1. Since the bootloader build explicitly sets
commonly required components, we need to support this feature in cmakev2
as well. Ideally, there should be no commonly required components, and
each component should specify its requirements explicitly.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
This commit is contained in:
Frantisek Hrbata
2026-03-05 17:24:13 +01:00
committed by BOT
parent 9204ed63e0
commit 44a610cbf0
+5 -1
View File
@@ -419,10 +419,14 @@ function(__init_common_components)
idf_build_get_property(idf_target IDF_TARGET)
idf_build_get_property(idf_target_arch IDF_TARGET_ARCH)
idf_build_get_property(explicit_requires_common __COMPONENT_REQUIRES_COMMON)
# Define common components that are included as dependencies for each
# component.
if("${idf_target}" STREQUAL "linux")
if(explicit_requires_common)
set(requires_common "${explicit_requires_common}")
elseif("${idf_target}" STREQUAL "linux")
set(requires_common freertos esp_hw_support heap log soc hal esp_rom esp_common esp_system linux
esp_stdio)
else()