From 20138417f3ada58e219e17f86f8031f6509447ca Mon Sep 17 00:00:00 2001 From: Klaus Kaempf Date: Wed, 3 Dec 2008 12:23:44 +0000 Subject: FindPackageHandleStandardArgs needs cmake > 2.4 --- cmake/modules/FindCheck.cmake | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'cmake') diff --git a/cmake/modules/FindCheck.cmake b/cmake/modules/FindCheck.cmake index 45e9626..7006db3 100644 --- a/cmake/modules/FindCheck.cmake +++ b/cmake/modules/FindCheck.cmake @@ -9,10 +9,13 @@ FIND_PATH(CHECK_INCLUDE_DIR NAMES check.h) # Look for the library. FIND_LIBRARY(CHECK_LIBRARY NAMES check) -# handle the QUIETLY and REQUIRED arguments and set CHECK_FOUND to TRUE if -# all listed variables are TRUE -INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(Check "Please install 'check' and 'check-devel' packages" CHECK_LIBRARY CHECK_INCLUDE_DIR) +IF(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERISION} GREATER 2.4) + # handle the QUIETLY and REQUIRED arguments and set CHECK_FOUND to TRUE if + # all listed variables are TRUE + INCLUDE(FindPackageHandleStandardArgs) + + FIND_PACKAGE_HANDLE_STANDARD_ARGS(Check "Please install 'check' and 'check-devel' packages" CHECK_LIBRARY CHECK_INCLUDE_DIR) +ENDIF(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERISION} GREATER 2.4) IF(CHECK_FOUND) SET( CHECK_LIBRARIES ${CHECK_LIBRARY} ) -- cgit v1.2.3