[CMake] FIND_PACKAGE, version check

Pierre pierre.php at gmail.com
Tue Jan 9 09:49:03 EST 2007


Hello,

Being new to this list and cmake, I first like to thank you for cmake,
it is a pleasure to work with it.

In an attempt to use CMake in libgd (http://libgd.org), I was looking
for a way to use the versions argument in find_package. For example, I
have to do something like:

FIND_PACKAGE(Freetype 2.2) or FIND_PACKAGE(Freetype 2.2.1)

I checked the various Find* function in cmake (2.4.3) or the various
other projects like KDE but they don't seem to check the version
informations in the cmake Find* macros. My idea was to provide
FOO_VERSION(_(MAJOR|MINOR|PATH), is it the way to go?

On the same topic, is there a need to improve a bit the existing
macros to use pkg-config as fallback? For example, ubuntu does not
install pngconfig or freetype-config but use pkg-config data only.

Regards,
--Pierre


More information about the CMake mailing list