mirror of
https://github.com/espressif/esp-idf.git
synced 2026-04-27 19:13:21 +00:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user