[vtk-developers] find_package arguments

David Doria daviddoria at gmail.com
Thu Feb 2 15:21:37 EST 2012


On Thu, Feb 2, 2012 at 3:16 PM, Brad King <brad.king at kitware.com> wrote:
> 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

Thanks Brad. Just to clarify the "at least 5.8" type of check should
still be done "manually" using

if(${VTK_MAJOR_VERSION} LESS 5 OR ${VTK_MINOR_VERSION} LESS 8)

right?



More information about the vtk-developers mailing list