Skip to content

Commit 43ad48e

Browse files
committed
Merge branch 'bugfix/env_var_SDKCONFIG_DEFAULTS_fail_with_bootloader_subproject_v4.4' into 'release/v4.4'
build_system: stop looking for env var `SDKCONFIG_DEFAULTS` in bootloader subproject (v4.4) See merge request espressif/esp-idf!21975
2 parents bd5af4d + 53f390f commit 43ad48e

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

tools/cmake/project.cmake

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,14 @@ macro(project project_name)
340340
# PROJECT_NAME is taken from the passed name from project() call
341341
# PROJECT_DIR is set to the current directory
342342
# PROJECT_VER is from the version text or git revision of the current repo
343-
set(_sdkconfig_defaults "$ENV{SDKCONFIG_DEFAULTS}")
343+
344+
# SDKCONFIG_DEFAULTS environment variable may specify a file name relative to the root of the project.
345+
# When building the bootloader, ignore this variable, since:
346+
# 1. The bootloader project uses an existing SDKCONFIG file from the top-level project
347+
# 2. File specified by SDKCONFIG_DEFAULTS will not be found relative to the root of the bootloader project
348+
if(NOT BOOTLOADER_BUILD)
349+
set(_sdkconfig_defaults "$ENV{SDKCONFIG_DEFAULTS}")
350+
endif()
344351

345352
if(NOT _sdkconfig_defaults)
346353
if(EXISTS "${CMAKE_SOURCE_DIR}/sdkconfig.defaults")

0 commit comments

Comments
 (0)