diff options
author | Craig Scott <craig.scott@crascit.com> | 2022-04-28 23:00:19 +1000 |
---|---|---|
committer | Craig Scott <craig.scott@crascit.com> | 2022-05-03 16:48:11 +1000 |
commit | 29e31e2825a2cd5099b8abe66f4816919cec934a (patch) | |
tree | a1590254fba9ed2a4e5e80b6725fc3f9795ac269 /Modules/FetchContent | |
parent | 1d82670bd4daff26d0d0169820b289bc401f4943 (diff) | |
download | cmake-29e31e2825a2cd5099b8abe66f4816919cec934a.tar.gz |
Packages: Integrate FetchContent and find_package()
Allow FetchContent_MakeAvailable() to try a call to
find_package() first, or redirect a find_package() call to
FetchContent_MakeAvailable(). The user can set variables
to control which of these are allowed or tried by default.
Fixes: #21687
Diffstat (limited to 'Modules/FetchContent')
-rw-r--r-- | Modules/FetchContent/package-config-version.cmake.in | 5 | ||||
-rw-r--r-- | Modules/FetchContent/package-config.cmake.in | 11 |
2 files changed, 16 insertions, 0 deletions
diff --git a/Modules/FetchContent/package-config-version.cmake.in b/Modules/FetchContent/package-config-version.cmake.in new file mode 100644 index 0000000000..7f190944cf --- /dev/null +++ b/Modules/FetchContent/package-config-version.cmake.in @@ -0,0 +1,5 @@ +# Automatically generated by CMake's FetchContent module. +# Do not edit this file, it will be regenerated every time CMake runs. + +# Version not available, assuming it is compatible +set(PACKAGE_VERSION_COMPATIBLE TRUE) diff --git a/Modules/FetchContent/package-config.cmake.in b/Modules/FetchContent/package-config.cmake.in new file mode 100644 index 0000000000..c3b64c907b --- /dev/null +++ b/Modules/FetchContent/package-config.cmake.in @@ -0,0 +1,11 @@ +# Automatically generated by CMake's FetchContent module. +# Do not edit this file, it will be regenerated every time CMake runs. + +# Projects or the dependencies themselves can provide the following files. +# The files should define any additional commands or variables that the +# dependency would normally provide but which won't be available globally +# if the dependency is brought into the build via FetchContent instead. +# For dependencies that only provide imported targets and no commands, +# these typically won't be needed. +include("${CMAKE_CURRENT_LIST_DIR}/@contentNameLower@-extra.cmake" OPTIONAL) +include("${CMAKE_CURRENT_LIST_DIR}/@contentName@Extra.cmake" OPTIONAL) |