[vtk-developers] find_package arguments

Brad King brad.king at kitware.com
Thu Feb 2 15:16:15 EST 2012


On 2/2/2012 2:23 PM, David Doria wrote:
> Some libraries have something like:
>
> FIND_PACKAGE(VTK 5.8 REQUIRED)
>
> but that doesn't seem to work for VTK's find script?

It should work with CMake 2.8.2 and higher:

   http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2c1a01dc

in combination with VTK 5.6.0 and higher:

   http://vtk.org/gitweb?p=VTK.git;a=commitdiff;h=19852427

Note that the VTKConfigVersion.cmake file's job is to find a VTK
that is "compatible" with the requested version, as documented
by the find_package command.  The decision that this particular
implementation in VTK makes is that a matching major.minor number
is considered compatible and otherwise not.  Therefore

   find_package(VTK 5.8 REQUIRED)

will not find current VTK master which is 5.9.  It will find a
VTK 5.8 installation though.

-Brad



More information about the vtk-developers mailing list