[CMake] package version control

Brandon Ess brandon.ess at gmail.com
Mon Sep 21 00:36:47 EDT 2015


Hi,

I'm working on implementing a way to enforce library version control for
library dependencies and I'm trying to figure out the best way to
accomplish this.

For example,

find_package(foo 1.2 required)

Where version 1.2 or greater must be used. If cmake finds version 1.1 or
less it will not use that library and print an error message.

Reading various cmake modules it seems everyone has a different way of
going about it.

I see there is an implementation built into cmake but I cannot seem to
quite grasp how it works.

http://www.cmake.org/Wiki/CMake/Tutorials/Packaging

I do have package config working and the library version is being defined
there so when the package foo is found it prints the version found via
package config but I'm not sure if relying on that is the best approach.

Could someone point me in the right direction?

thanks,

Brandon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20150920/f2ecfaa0/attachment.html>


More information about the CMake mailing list