cmake: Fix issues when IDF_PATH is not set in environment
Support cases where IDF_PATH may be passed in on the cmake command line, or inferred from a (hardcoded absolute or relative) path to project.cmake
This commit is contained in:
committed by
Angus Gratton
parent
be829afe6e
commit
bf10447b82
@@ -5,6 +5,11 @@ if(NOT SDKCONFIG)
|
||||
"in by the parent build process.")
|
||||
endif()
|
||||
|
||||
if(NOT IDF_PATH)
|
||||
message(FATAL_ERROR "Bootloader subproject expects the IDF_PATH variable to be passed "
|
||||
"in by the parent build process.")
|
||||
endif()
|
||||
|
||||
set(COMPONENTS bootloader esptool_py esp32 soc bootloader_support log spi_flash micro-ecc soc)
|
||||
set(BOOTLOADER_BUILD 1)
|
||||
add_definitions(-DBOOTLOADER_BUILD=1)
|
||||
@@ -13,7 +18,7 @@ set(COMPONENT_REQUIRES_COMMON log esp32 soc)
|
||||
|
||||
set(MAIN_SRCS main/bootloader_start.c)
|
||||
|
||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||
include("${IDF_PATH}/tools/cmake/project.cmake")
|
||||
project(bootloader)
|
||||
|
||||
target_linker_script(bootloader.elf
|
||||
|
||||
Reference in New Issue
Block a user