You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
490 B
16 lines
490 B
include(FetchContent)
|
|
|
|
set(CMAKE_PREFIX_PATH ${CMAKE_CURRENT_LIST_DIR}/PackageConfigs)
|
|
|
|
FetchContent_Declare(
|
|
AddedProject
|
|
# Ensure failure if we don't re-route to find_package()
|
|
SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/FatalIfAdded
|
|
FIND_PACKAGE_ARGS REQUIRED
|
|
)
|
|
|
|
# Cycle through a few calls to exercise global property changes
|
|
FetchContent_MakeAvailable(AddedProject)
|
|
find_package(AddedProject REQUIRED)
|
|
FetchContent_MakeAvailable(AddedProject) # Will re-route to find_package() again
|