summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-10-15 17:03:09 (GMT)
committerKitware Robot <kwrobot@kitware.com>2018-10-15 17:03:17 (GMT)
commit0c1622dca6a521416c747a0ee7d13b176456f996 (patch)
treebb72911b4e87ebcf8d75ba1d5e9764b32fe03e53 /Modules
parent6c281138a577ccf07ae71b1286df30a3d22746e0 (diff)
parent7f2bc70c5ebc8d3afd05ef05cb1de736738275cf (diff)
downloadCMake-0c1622dca6a521416c747a0ee7d13b176456f996.zip
CMake-0c1622dca6a521416c747a0ee7d13b176456f996.tar.gz
CMake-0c1622dca6a521416c747a0ee7d13b176456f996.tar.bz2
Merge topic 'FindPkgConfig-operator-docs'
7f2bc70c5e FindPkgConfig: Document support for > and < operators Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Rolf Eike Beer <eike@sf-mail.de> Merge-request: !2481
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindPkgConfig.cmake15
1 files changed, 9 insertions, 6 deletions
diff --git a/Modules/FindPkgConfig.cmake b/Modules/FindPkgConfig.cmake
index a96df99..06beb7d 100644
--- a/Modules/FindPkgConfig.cmake
+++ b/Modules/FindPkgConfig.cmake
@@ -540,12 +540,15 @@ endmacro()
:command:`target_link_libraries`. The ``GLOBAL`` argument will make the
imported target available in global scope.
- Each ``<moduleSpec>`` must be in one of the following formats::
-
- {moduleName} ... matches any version
- {moduleName}>={version} ... at least version <version> is required
- {moduleName}={version} ... exactly version <version> is required
- {moduleName}<={version} ... modules must not be newer than <version>
+ Each ``<moduleSpec>`` can be either a bare module name or it can be a
+ module name with a version constraint (operators ``=``, ``<``, ``>``,
+ ``<=`` and ``>=`` are supported). The following are examples for a module
+ named ``foo`` with various constraints::
+
+ foo # Any version matches
+ foo<2 # Only match versions before 2
+ foo>=3.1 # Match any version from 3.1 or later
+ foo=1.2.3 # Foo must be exactly version 1.2.3
The following variables may be set upon return. Two sets of values exist,
one for the common case (``<XXX> = <prefix>``) and another for the