mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-03 20:54:32 +02:00
cmake: Expand components relative to PROJECT_PATH correctly
This commit is contained in:
committed by
Angus Gratton
parent
04238fa5e5
commit
70288f864e
@@ -59,8 +59,10 @@ macro(project name)
|
|||||||
-D "DEPENDENCIES_FILE=${CMAKE_BINARY_DIR}/component_depends.cmake"
|
-D "DEPENDENCIES_FILE=${CMAKE_BINARY_DIR}/component_depends.cmake"
|
||||||
-D "COMPONENT_DIRS=${COMPONENT_DIRS}"
|
-D "COMPONENT_DIRS=${COMPONENT_DIRS}"
|
||||||
-D "BOOTLOADER_BUILD=${BOOTLOADER_BUILD}"
|
-D "BOOTLOADER_BUILD=${BOOTLOADER_BUILD}"
|
||||||
|
-D "IDF_PATH=${IDF_PATH}"
|
||||||
|
-D "DEBUG=${DEBUG}"
|
||||||
-P "${IDF_PATH}/tools/cmake/scripts/expand_requirements.cmake"
|
-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")
|
include("${CMAKE_BINARY_DIR}/component_depends.cmake")
|
||||||
|
|
||||||
# We now have the following component-related variables:
|
# We now have the following component-related variables:
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
#
|
#
|
||||||
# TODO: Error out if a component requirement is missing
|
# TODO: Error out if a component requirement is missing
|
||||||
cmake_minimum_required(VERSION 3.5)
|
cmake_minimum_required(VERSION 3.5)
|
||||||
include("utilities.cmake")
|
include("${IDF_PATH}/tools/cmake/utilities.cmake")
|
||||||
|
|
||||||
if(NOT DEPENDENCIES_FILE)
|
if(NOT DEPENDENCIES_FILE)
|
||||||
message(FATAL_ERROR "DEPENDENCIES_FILE must be set.")
|
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
|
# Look for a component in each component_dirs entry
|
||||||
foreach(dir ${component_dirs})
|
foreach(dir ${component_dirs})
|
||||||
|
debug("Looking for CMakeLists.txt in ${dir}")
|
||||||
file(GLOB component "${dir}/CMakeLists.txt")
|
file(GLOB component "${dir}/CMakeLists.txt")
|
||||||
if(component)
|
if(component)
|
||||||
|
debug("CMakeLists.txt file ${component}")
|
||||||
get_filename_component(component "${component}" DIRECTORY)
|
get_filename_component(component "${component}" DIRECTORY)
|
||||||
get_filename_component(name "${component}" NAME)
|
get_filename_component(name "${component}" NAME)
|
||||||
if(NOT name IN_LIST names)
|
if(NOT name IN_LIST names)
|
||||||
|
Reference in New Issue
Block a user