From 53b684c00d5fecadac936a3fe25f224c19f2bf92 Mon Sep 17 00:00:00 2001 From: Frantisek Hrbata Date: Tue, 10 Mar 2026 14:04:14 +0100 Subject: [PATCH] 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 --- tools/cmakev2/project.cmake | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tools/cmakev2/project.cmake b/tools/cmakev2/project.cmake index c4da93808a..b26a9a49a1 100644 --- a/tools/cmakev2/project.cmake +++ b/tools/cmakev2/project.cmake @@ -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)