1. Platform and toolchain files are now all under `platforms/`, with a
single `CMake/platforms/${platform}.cmake` per platform.
2. Custom functions/macros are under `functions/`.
3. Finder modules are in `/finders`.
14 lines
669 B
CMake
14 lines
669 B
CMake
# Like `FetchContent_MakeAvailable` but passes EXCLUDE_FROM_ALL to `add_subdirectory`.
|
|
macro(FetchContent_MakeAvailableExcludeFromAll)
|
|
foreach(contentName IN ITEMS ${ARGV})
|
|
string(TOLOWER ${contentName} contentNameLower)
|
|
FetchContent_GetProperties(${contentName})
|
|
if(NOT ${contentNameLower}_POPULATED)
|
|
FetchContent_Populate(${contentName})
|
|
if(EXISTS ${${contentNameLower}_SOURCE_DIR}/CMakeLists.txt)
|
|
add_subdirectory(${${contentNameLower}_SOURCE_DIR}
|
|
${${contentNameLower}_BINARY_DIR} EXCLUDE_FROM_ALL)
|
|
endif()
|
|
endif()
|
|
endforeach()
|
|
endmacro()
|