From aaf5ea2d7034eb42659e985ae5bd51dde3625134 Mon Sep 17 00:00:00 2001 From: "Joachim Wuttke (l)" Date: Wed, 3 Oct 2018 21:37:32 +0200 Subject: Help: Add section headers to find_package command The document is pretty long but is already mostly organized into sections. Add explicit section headers. --- Help/command/find_package.rst | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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( [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 ``_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_` 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): -- cgit v0.12