|
|
@@ -7,6 +7,9 @@ find_package
|
|
|
|
|
|
Find an external project, and load its settings.
|
|
|
|
|
|
+Basic Signature and Module Mode
|
|
|
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
+
|
|
|
::
|
|
|
|
|
|
find_package(<PackageName> [version] [EXACT] [QUIET] [MODULE]
|
|
|
@@ -42,6 +45,9 @@ package-by-package basis (details below).
|
|
|
See the :command:`cmake_policy` command documentation for discussion
|
|
|
of the ``NO_POLICY_SCOPE`` option.
|
|
|
|
|
|
+Full Signature and Config Mode
|
|
|
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
+
|
|
|
User code should generally look for packages using the above simple
|
|
|
signature. The remainder of this command documentation specifies the
|
|
|
full command signature and details of the search process. Project
|
|
|
@@ -114,6 +120,9 @@ fatal error is generated and the configure step stops executing. If
|
|
|
``<PackageName>_DIR`` has been set to a directory not containing a
|
|
|
configuration file CMake will ignore it and search from scratch.
|
|
|
|
|
|
+Version Selection
|
|
|
+^^^^^^^^^^^^^^^^^
|
|
|
+
|
|
|
When the ``[version]`` argument is given Config mode will only find a
|
|
|
version of the package that claims compatibility with the requested
|
|
|
version (format is ``major[.minor[.patch[.tweak]]]``). If the ``EXACT``
|
|
|
@@ -206,6 +215,9 @@ package configuration files are encouraged to name and install them
|
|
|
such that the procedure outlined below will find them without
|
|
|
requiring use of additional options.
|
|
|
|
|
|
+Search Procedure
|
|
|
+^^^^^^^^^^^^^^^^
|
|
|
+
|
|
|
CMake constructs a set of possible installation prefixes for the
|
|
|
package. Under each prefix several directories are searched for a
|
|
|
configuration file. The tables below show the directories searched.
|
|
|
@@ -346,6 +358,9 @@ enabled.
|
|
|
Every non-REQUIRED ``find_package`` call can be disabled by setting the
|
|
|
:variable:`CMAKE_DISABLE_FIND_PACKAGE_<PackageName>` variable to ``TRUE``.
|
|
|
|
|
|
+Package File Interface Variables
|
|
|
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
+
|
|
|
When loading a find module or package configuration file ``find_package``
|
|
|
defines variables to provide information about the call arguments (and
|
|
|
restores their original state before returning):
|