diff --git a/components/ulp/cmake/IDFULPProject.cmake b/components/ulp/cmake/IDFULPProject.cmake index fbab4d6992..ec5d85e9db 100644 --- a/components/ulp/cmake/IDFULPProject.cmake +++ b/components/ulp/cmake/IDFULPProject.cmake @@ -49,7 +49,7 @@ function(ulp_apply_default_sources ulp_app_name) list(APPEND ULP_PREPRO_ARGS -I${sdkconfig_dir}) list(APPEND ULP_PREPRO_ARGS -I${IDF_PATH}/components/esp_system/ld) - target_include_directories(${ulp_app_name} PRIVATE ${COMPONENT_INCLUDES}) + target_include_directories(${ulp_app_name} PRIVATE ${COMPONENT_INCLUDES} ${sdkconfig_dir}) # Pre-process the linker script if(CONFIG_ULP_COPROC_TYPE_RISCV) diff --git a/tools/cmakev2/kconfig.cmake b/tools/cmakev2/kconfig.cmake index a4b08c5a53..de38a6ab7b 100644 --- a/tools/cmakev2/kconfig.cmake +++ b/tools/cmakev2/kconfig.cmake @@ -656,12 +656,18 @@ function(__generate_kconfig_outputs) set_property(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" APPEND PROPERTY ADDITIONAL_CLEAN_FILES "${sdkconfig_header}" "${sdkconfig_cmake}") - # Store output paths in build properties + # Store output paths in build properties (internal) idf_build_set_property(__SDKCONFIG_HEADER "${sdkconfig_header}") idf_build_set_property(__SDKCONFIG_CMAKE "${sdkconfig_cmake}") idf_build_set_property(__SDKCONFIG_JSON "${sdkconfig_json}") idf_build_set_property(__SDKCONFIG_JSON_MENUS "${sdkconfig_json_menus}") + # Public aliases for backward compatibility with components (e.g. ULP) + idf_build_set_property(SDKCONFIG_HEADER "${sdkconfig_header}") + idf_build_set_property(SDKCONFIG_CMAKE "${sdkconfig_cmake}") + idf_build_set_property(SDKCONFIG_JSON "${sdkconfig_json}") + idf_build_set_property(SDKCONFIG_JSON_MENUS "${sdkconfig_json_menus}") + idf_msg("Generated Kconfig outputs in ${config_dir}") endfunction() 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)