Merge branch 'bugfix/fix_extra_component_dirs_ordering' into 'master'

cmake: fix extra component dir ordering

See merge request espressif/esp-idf!7731
This commit is contained in:
Angus Gratton 2020-06-15 12:16:52 +08:00
commit 534114879c

View file

@ -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)