[vtk-developers] find_package arguments

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


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

The find_package command will set VTK_VERSION to the version found.
Therefore you can write:

find_package(VTK REQUIRED)
if("${VTK_VERSION}" VERSION_LESS 5.8)
   ...
endif()

-Brad



More information about the vtk-developers mailing list