[CMake] find_package_version_check
Andreas Schneider
mail at cynapses.org
Thu Aug 13 04:29:56 EDT 2009
Hi,
I had to add a version check to on of my find modules in KDE. So I started and
asked myself why do I have to right so much code to get a version check. This
should be done by CMake and not by me.
So I've created a function find_package_version_check() you can use. All you
have to do is to set the version number.
Example:
find_package(LibSSH 0.3.2 EXACT)
# check for the version and set it
set(LibSSH_VERSION 0.4.0)
find_package_version_check(LibSSH DEFAULT_MSG)
Error:
The installed LibSSH version 0.4.0 is too new, version 0.3.2 is required.
Comments and improvements are very welcome :)
Cheers,
-- andreas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090813/3c5991af/attachment.pgp>
More information about the CMake
mailing list