summaryrefslogtreecommitdiffstats
path: root/Help
diff options
context:
space:
mode:
authorJoachim Wuttke (l) <j.wuttke@fz-juelich.de>2018-10-03 19:37:32 (GMT)
committerBrad King <brad.king@kitware.com>2018-10-04 18:57:56 (GMT)
commitaaf5ea2d7034eb42659e985ae5bd51dde3625134 (patch)
treec65634f4e9eaf84a558ab794b2c1fcbc4328426a /Help
parent56310b06713c452eb17bcc90683c0bdb4270e9a9 (diff)
downloadCMake-aaf5ea2d7034eb42659e985ae5bd51dde3625134.zip
CMake-aaf5ea2d7034eb42659e985ae5bd51dde3625134.tar.gz
CMake-aaf5ea2d7034eb42659e985ae5bd51dde3625134.tar.bz2
Help: Add section headers to find_package command
The document is pretty long but is already mostly organized into sections. Add explicit section headers.
Diffstat (limited to 'Help')
-rw-r--r--Help/command/find_package.rst15
1 files changed, 15 insertions, 0 deletions
diff --git a/Help/command/find_package.rst b/Help/command/find_package.rst
index 67a2db7..d54b514 100644
--- a/Help/command/find_package.rst
+++ b/Help/command/find_package.rst
@@ -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):