From 7056fd312902d28549fd248813086acc944fa1e4 Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Thu, 7 Oct 2021 16:54:34 +0200 Subject: [PATCH] bootloader: don't add nonexistent directories to EXTRA_COMPONENT_DIRS --- components/bootloader/subproject/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/components/bootloader/subproject/CMakeLists.txt b/components/bootloader/subproject/CMakeLists.txt index f2df83fab9..f805f93eb9 100644 --- a/components/bootloader/subproject/CMakeLists.txt +++ b/components/bootloader/subproject/CMakeLists.txt @@ -37,7 +37,9 @@ set(COMPONENTS # Make EXTRA_COMPONENT_DIRS variable to point to the bootloader_components directory # of the project being compiled set(PROJECT_EXTRA_COMPONENTS "${PROJECT_SOURCE_DIR}/bootloader_components") -list(APPEND EXTRA_COMPONENT_DIRS "${PROJECT_EXTRA_COMPONENTS}") +if(EXISTS ${PROJECT_EXTRA_COMPONENTS}) + list(APPEND EXTRA_COMPONENT_DIRS "${PROJECT_EXTRA_COMPONENTS}") +endif() # Consider each directory in project's bootloader_components as a component to be compiled file(GLOB proj_components RELATIVE ${PROJECT_EXTRA_COMPONENTS} ${PROJECT_EXTRA_COMPONENTS}/*)