cmake: Expand components relative to PROJECT_PATH correctly
This commit is contained in:
parent
04238fa5e5
commit
70288f864e
|
@ -59,8 +59,10 @@ macro(project name)
|
|||
-D "DEPENDENCIES_FILE=${CMAKE_BINARY_DIR}/component_depends.cmake"
|
||||
-D "COMPONENT_DIRS=${COMPONENT_DIRS}"
|
||||
-D "BOOTLOADER_BUILD=${BOOTLOADER_BUILD}"
|
||||
-D "IDF_PATH=${IDF_PATH}"
|
||||
-D "DEBUG=${DEBUG}"
|
||||
-P "${IDF_PATH}/tools/cmake/scripts/expand_requirements.cmake"
|
||||
WORKING_DIRECTORY "${IDF_PATH}/tools/cmake")
|
||||
WORKING_DIRECTORY "${PROJECT_PATH}")
|
||||
include("${CMAKE_BINARY_DIR}/component_depends.cmake")
|
||||
|
||||
# We now have the following component-related variables:
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#
|
||||
# TODO: Error out if a component requirement is missing
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
include("utilities.cmake")
|
||||
include("${IDF_PATH}/tools/cmake/utilities.cmake")
|
||||
|
||||
if(NOT DEPENDENCIES_FILE)
|
||||
message(FATAL_ERROR "DEPENDENCIES_FILE must be set.")
|
||||
|
@ -91,8 +91,10 @@ function(components_find_all component_dirs component_paths component_names)
|
|||
|
||||
# Look for a component in each component_dirs entry
|
||||
foreach(dir ${component_dirs})
|
||||
debug("Looking for CMakeLists.txt in ${dir}")
|
||||
file(GLOB component "${dir}/CMakeLists.txt")
|
||||
if(component)
|
||||
debug("CMakeLists.txt file ${component}")
|
||||
get_filename_component(component "${component}" DIRECTORY)
|
||||
get_filename_component(name "${component}" NAME)
|
||||
if(NOT name IN_LIST names)
|
||||
|
|
Loading…
Reference in a new issue