[cmake-commits] king committed readme.txt 1.12 1.13

cmake-commits at cmake.org cmake-commits at cmake.org
Mon Jan 21 08:48:35 EST 2008


Update of /cvsroot/CMake/CMake/Modules
In directory public:/mounts/ram/cvs-serv9907/Modules

Modified Files:
	readme.txt 
Log Message:
ENH: Implement version support in the find_package command module mode.  Version numbers provided to the command are converted to variable settings to tell the FindXXX.cmake module what version is requested.  This addresses issue #1645.


Index: readme.txt
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/readme.txt,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- readme.txt	19 Jul 2007 13:00:51 -0000	1.12
+++ readme.txt	21 Jan 2008 13:48:33 -0000	1.13
@@ -18,6 +18,10 @@
 XXX_RUNTIME_LIBRARY_DIRS Optionally, the runtime library search path for use when running an executable linked to shared libraries.
                          The list should be used by user code to create the PATH on windows or LD_LIBRARY_PATH on unix.
                          This should not be a cache entry.
+XXX_VERSION_STRING      A human-readable string containing the version of the package found, if any.
+XXX_VERSION_MAJOR       The major version of the package found, if any.
+XXX_VERSION_MINOR       The minor version of the package found, if any.
+XXX_VERSION_PATCH       The patch version of the package found, if any.
 
 You do not have to provide all of the above variables. You should provide XXX_FOUND under most circumstances. If XXX is a library, then  XXX_LIBRARIES, should also be defined, and XXX_INCLUDE_DIRS should usually be defined (I guess libm.a might be an exception)
 
@@ -63,7 +67,19 @@
 
 A FindXXX.cmake module will typically be loaded by the command
 
-  FIND_PACKAGE(XXX [QUIET] [REQUIRED [components...]])
+  FIND_PACKAGE(XXX [major[.minor[.patch]]]
+               [QUIET] [REQUIRED [components...]])
+
+If any version numbers are given to the command it will set the
+variable XXX_FIND_VERSION to contain the whole version.  The variables
+XXX_FIND_VERSION_MAJOR, XXX_FIND_VERSION_MINOR, and
+XXX_FIND_VERSION_PATCH will be set to contain the corresponding
+portions of the version number.  If the find module supports
+versioning it should locate a version of the package that is
+compatible with the version requested.  If a compatible version of the
+package cannot be found the module should not report success.  The
+version of the package found should be stored in the version variables
+named above.
 
 If the QUIET option is given to the command it will set the variable
 XXX_FIND_QUIETLY to true before loading the FindXXX.cmake module.  If



More information about the Cmake-commits mailing list