[CMake] find_package_handle_standard_args VERSION_VAR

Rolf Eike Beer eike at sf-mail.de
Tue Oct 28 15:29:34 EDT 2014


Am Dienstag, 28. Oktober 2014, 15:16:05 schrieb George:
> Hello,
> 
> I am using cmake version 2.8.12.2. I am trying to force an exact version
> number match in a custom finder, and the VERSION_VAR parameter does not
> seem to be working the way I am using it.
> 
> I have the following simple example:
> 
> file: FindHello.cmake
> -------------------------------------
> include(FindPackageHandleStandardArgs)
> set( VV "1.5.0" )
> set( RV "Hello" )
> find_package_handle_standard_args(Hello REQUIRED_VARS RV VERSION_VAR ${VV} )

find_package_handle_standard_args(Hello REQUIRED_VARS RV VERSION_VAR VV )

You want to pass the variable name to FPHSA, not it's content.

Eike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://public.kitware.com/pipermail/cmake/attachments/20141028/d9ee2d29/attachment.sig>


More information about the CMake mailing list