[CMake] find_package_handle_standard_args VERSION_VAR
George
george.ryan at gmail.com
Tue Oct 28 14:16:05 EDT 2014
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} )
if(HELLO_FOUND)
message( "yes" )
else()
message( "no" )
endif()
----------------------------------------------
file: CMakeLists.txt
----------------------------------------------
cmake_minimum_required(VERSION 2.6)
project( hello )
set( CMAKE_MODULE_PATH
${CMAKE_CURRENT_SOURCE_DIR}/finder )
find_package( Hello 6.0.0 EXACT )
----------------------------------------------
No matter what I pass in to the find_package( Hello ) call in terms of
version numbers and modifiers, the finder always prints out "yes" as though
the VERSION_VAR parameter wasn't working.
Any suggestions?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20141028/ba79e0ec/attachment.html>
More information about the CMake
mailing list