mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-07 22:30:13 -06:00
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
18 lines
835 B
ReStructuredText
18 lines
835 B
ReStructuredText
FetchContent_find_package_integration
|
|
-------------------------------------
|
|
|
|
* Integration has been added between the :module:`FetchContent` module and the
|
|
:command:`find_package` command, enabling the following new capabilities:
|
|
|
|
* :command:`FetchContent_MakeAvailable` can now try to satisfy a dependency
|
|
by calling :command:`find_package` first. A new
|
|
:variable:`FETCHCONTENT_TRY_FIND_PACKAGE_MODE` variable controls whether
|
|
this is done by default for all dependencies, is opt-in per dependency,
|
|
or is disabled entirely.
|
|
|
|
* :command:`find_package` can be re-routed to call
|
|
:command:`FetchContent_MakeAvailable` instead. A new read-only
|
|
:variable:`CMAKE_FIND_PACKAGE_REDIRECTS_DIR` variable points to a
|
|
directory where config package files can be located to facilitate these
|
|
re-routed calls.
|