From 7f37fb81caa142c3c2235b15e25064d0608d366b Mon Sep 17 00:00:00 2001 From: Renz Christian Bagaporo Date: Thu, 20 Feb 2020 12:34:51 +0500 Subject: [PATCH] cmake: fix extra component dir ordering --- tools/cmake/project.cmake | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tools/cmake/project.cmake b/tools/cmake/project.cmake index 2ec9ea4a6..a18655b2a 100644 --- a/tools/cmake/project.cmake +++ b/tools/cmake/project.cmake @@ -217,18 +217,18 @@ function(__project_init components_var test_components_var) "but component manager is not enabled. Please set IDF_COMPONENT_MANAGER environment variable.") endif() + spaces2list(EXTRA_COMPONENT_DIRS) + foreach(component_dir ${EXTRA_COMPONENT_DIRS}) + __project_component_dir("${component_dir}") + endforeach() + + __project_component_dir("${CMAKE_CURRENT_LIST_DIR}/components") + # Look for components in the usual places: CMAKE_CURRENT_LIST_DIR/main, # CMAKE_CURRENT_LIST_DIR/components, and the extra component dirs if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/main") __project_component_dir("${CMAKE_CURRENT_LIST_DIR}/main") endif() - - __project_component_dir("${CMAKE_CURRENT_LIST_DIR}/components") - - spaces2list(EXTRA_COMPONENT_DIRS) - foreach(component_dir ${EXTRA_COMPONENT_DIRS}) - __project_component_dir("${component_dir}") - endforeach() endif() spaces2list(COMPONENTS)