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?
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Reply via email to