fix(cmakev2/project): export build properties as variables for project_include.cmake

In cmake v1, __build_process_project_includes() exports all build
properties as CMake variables before including project_include.cmake
files. cmakev2 was missing this step, causing components like ULP that
reference build properties as CMake variables (e.g. ${SDKCONFIG_HEADER})
to receive empty values.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
This commit is contained in:
Frantisek Hrbata
2026-03-10 14:04:14 +01:00
parent cdbc0244e0
commit 53b684c00d
+9
View File
@@ -604,6 +604,15 @@ macro(idf_project_init)
# Ensure this is done after including the sdkconfig.
__init_idf_target_arch()
# Make build properties available as CMake variables for backward
# compatibility with project_include.cmake files (e.g. ULP component
# references ${SDKCONFIG_HEADER} and ${SDKCONFIG_CMAKE} directly).
idf_build_get_property(build_properties BUILD_PROPERTIES)
foreach(build_property IN LISTS build_properties)
idf_build_get_property(val ${build_property})
set(${build_property} "${val}")
endforeach()
# Include all project_include.cmake files for the components that have
# been discovered.
idf_build_get_property(component_interfaces COMPONENT_INTERFACES)