From 7f2bc70c5ebc8d3afd05ef05cb1de736738275cf Mon Sep 17 00:00:00 2001 From: Craig Scott Date: Sat, 13 Oct 2018 17:44:18 +1100 Subject: FindPkgConfig: Document support for > and < operators This was left out of commit v3.13.0-rc1~14^2 (FindPkgConfig: support also > and < operators for version compares, 2018-10-02). --- Modules/FindPkgConfig.cmake | 15 +++++++++------ 1 file 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 ```` must be in one of the following formats:: - - {moduleName} ... matches any version - {moduleName}>={version} ... at least version is required - {moduleName}={version} ... exactly version is required - {moduleName}<={version} ... modules must not be newer than + Each ```` 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 (`` = ``) and another for the -- cgit v0.12