From dc3d9bb2ab96ecdb6bcbb4c83ddae9e149f5fd7e Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Mon, 29 Mar 2010 23:20:22 +0200 Subject: Fixed GCrypt find module. --- cmake/Modules/FindGCrypt.cmake | 34 ++++++++++------------------------ 1 file changed, 10 insertions(+), 24 deletions(-) (limited to 'cmake/Modules/FindGCrypt.cmake') diff --git a/cmake/Modules/FindGCrypt.cmake b/cmake/Modules/FindGCrypt.cmake index 23d96b2..71edd32 100644 --- a/cmake/Modules/FindGCrypt.cmake +++ b/cmake/Modules/FindGCrypt.cmake @@ -6,7 +6,7 @@ # GCRYPT_LIBRARIES - Link these to use GCrypt # GCRYPT_DEFINITIONS - Compiler switches required for using GCrypt # -# Copyright (c) 2009 Andreas Schneider +# Copyright (c) 2009-2010 Andreas Schneider # # Redistribution and use is allowed according to the terms of the New # BSD license. @@ -27,8 +27,8 @@ else (GCRYPT_LIBRARIES AND GCRYPT_INCLUDE_DIRS) /usr/local/include /opt/local/include /sw/include + /usr/lib/sfw/include ) - mark_as_advanced(GCRYPT_INCLUDE_DIR) find_library(GCRYPT_LIBRARY NAMES @@ -38,37 +38,23 @@ else (GCRYPT_LIBRARIES AND GCRYPT_INCLUDE_DIRS) /usr/local/lib /opt/local/lib /sw/lib + /usr/sfw/lib/64 + /usr/sfw/lib ) - mark_as_advanced(GCRYPT_LIBRARY) - - if (GCRYPT_LIBRARY) - set(GCRYPT_FOUND TRUE CACHE INTERNAL "Wether the gcrypt library has been found" FORCE) - endif (GCRYPT_LIBRARY) set(GCRYPT_INCLUDE_DIRS ${GCRYPT_INCLUDE_DIR} ) - if (GCRYPT_FOUND) + if (GCRYPT_LIBRARY) set(GCRYPT_LIBRARIES - ${GCRYPT_LIBRARIES} - ${GCRYPT_LIBRARY} + ${GCRYPT_LIBRARIES} + ${GCRYPT_LIBRARY} ) - endif (GCRYPT_FOUND) - - if (GCRYPT_INCLUDE_DIRS AND GCRYPT_LIBRARIES) - set(GCRYPT_FOUND TRUE) - endif (GCRYPT_INCLUDE_DIRS AND GCRYPT_LIBRARIES) + endif (GCRYPT_LIBRARY) - if (GCRYPT_FOUND) - if (NOT GCrypt_FIND_QUIETLY) - message(STATUS "Found GCrypt: ${GCRYPT_LIBRARIES}") - endif (NOT GCrypt_FIND_QUIETLY) - else (GCRYPT_FOUND) - if (GCrypt_FIND_REQUIRED) - message(FATAL_ERROR "Could not find GCrypt") - endif (GCrypt_FIND_REQUIRED) - endif (GCRYPT_FOUND) + include(FindPackageHandleStandardArgs) + find_package_handle_standard_args(GCrypt DEFAULT_MSG GCRYPT_LIBRARIES GCRYPT_INCLUDE_DIRS) # show the GCRYPT_INCLUDE_DIRS and GCRYPT_LIBRARIES variables only in the advanced view mark_as_advanced(GCRYPT_INCLUDE_DIRS GCRYPT_LIBRARIES) -- cgit v1.2.3