On 22. Jul, 2010, at 9:18 , Alan W. Irwin wrote:
> On 2010-07-22 03:09+0200 Michael Hertling wrote:
>> [...] one should
>> prefer to improve the find modules and get rid of those non-equivalent
>> alternatives after the NAMES option, in particular hardcoded version
>> lists, and freshly developed modules should use FIND_PACKAGES()'s
>> version interface right from the beginning.
>
> This certainly sounds promising for dealing with the same-directory
> case. However, although the version interface appears in the usual
> documentation, I cannot find a single example of a
> <config-file>Version.cmake file. Am I missing something or is there
> no practical demonstration of the version interface for any Find
> module included with CMake?
You are mixing two things here. <config-file>Version.cmake file are only used
for the config-mode of find_package and should be installed by a CMake-based
project. The FindXXX.cmake modules, however, get the version information passed
as predefined variables. Examples can be found in
Find{Boost,CUDA,GTK2,Java,OpenSceneGraph,Qt4,Ruby,VTK}.cmake.
>
> Until there is a practical demonstration of the version interface it
> is hard to be sure this is the solution we should recommend for all
> find modules. Therefore, would you be willing to create a simple
> project demonstrating your idea and share it with this list?
See above. But even then, the version interface is useful to specify the
minimum or exact version that are required, but one can't express the wish to
find the NEWEST version, and it doesn't capture the maximum version case at all.
Michael
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake