From e1db12993bcfe9528e2da7cd5d92d3d2493731bf Mon Sep 17 00:00:00 2001 From: Renz Christian Bagaporo Date: Wed, 8 May 2019 14:49:52 +0800 Subject: [PATCH] bootloader: pass legacy header config variable to subproject --- components/bootloader/project_include.cmake | 4 ++++ components/bootloader/subproject/CMakeLists.txt | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/components/bootloader/project_include.cmake b/components/bootloader/project_include.cmake index a4faae97e3..49e51b9cbb 100644 --- a/components/bootloader/project_include.cmake +++ b/components/bootloader/project_include.cmake @@ -63,6 +63,10 @@ if((NOT CONFIG_SECURE_BOOT_ENABLED) OR -DSECURE_BOOT_SIGNING_KEY=${secure_boot_signing_key} -DPYTHON_DEPS_CHECKED=1 -DEXTRA_COMPONENT_DIRS=${CMAKE_CURRENT_LIST_DIR} + # LEGACY_INCLUDE_COMMON_HEADERS has to be passed in via cache variable since + # the bootloader common component requirements depends on this and + # config variables are not available before project() call. + -DLEGACY_INCLUDE_COMMON_HEADERS=${CONFIG_LEGACY_INCLUDE_COMMON_HEADERS} INSTALL_COMMAND "" BUILD_ALWAYS 1 # no easy way around this... BUILD_BYPRODUCTS ${bootloader_binary_files} diff --git a/components/bootloader/subproject/CMakeLists.txt b/components/bootloader/subproject/CMakeLists.txt index 1f39199152..d6334ae155 100644 --- a/components/bootloader/subproject/CMakeLists.txt +++ b/components/bootloader/subproject/CMakeLists.txt @@ -19,7 +19,7 @@ set(COMPONENTS bootloader esptool_py partition_table soc bootloader_support log set(BOOTLOADER_BUILD 1) include("${IDF_PATH}/tools/cmake/project.cmake") set(common_req log esp_rom esp_common xtensa) -if (CONFIG_LEGACY_INCLUDE_COMMON_HEADERS) +if(LEGACY_INCLUDE_COMMON_HEADERS) list(APPEND common_req soc) endif() idf_build_set_property(__COMPONENT_REQUIRES_COMMON "${common_req}") -- 2.40.0