From 9d0e3501c53558a88afbcd2646d3d5442b506e4d Mon Sep 17 00:00:00 2001 From: Renz Christian Bagaporo Date: Thu, 20 Feb 2020 12:31:23 +0500 Subject: [PATCH] cmake: fix extra component dirs ordering --- tools/cmake/project.cmake | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/cmake/project.cmake b/tools/cmake/project.cmake index 13478facc..e9d426b75 100644 --- a/tools/cmake/project.cmake +++ b/tools/cmake/project.cmake @@ -30,6 +30,12 @@ macro(project name) endforeach() endif() + if(NOT MAIN_SRCS) + list(APPEND IDF_EXTRA_COMPONENT_DIRS "${CMAKE_SOURCE_DIR}/main") + endif() + + list(APPEND IDF_EXTRA_COMPONENT_DIRS "${CMAKE_SOURCE_DIR}/components") + if(EXTRA_COMPONENT_DIRS) spaces2list(EXTRA_COMPONENT_DIRS) @@ -39,12 +45,6 @@ macro(project name) endforeach() endif() - list(APPEND IDF_EXTRA_COMPONENT_DIRS "${CMAKE_SOURCE_DIR}/components") - - if(NOT MAIN_SRCS) - list(APPEND IDF_EXTRA_COMPONENT_DIRS "${CMAKE_SOURCE_DIR}/main") - endif() - if(COMPONENTS) set(IDF_COMPONENTS "${COMPONENTS}") endif()