diff options
author | Andreas Schneider <mail@cynapses.org> | 2010-03-29 23:20:22 +0200 |
---|---|---|
committer | Andreas Schneider <mail@cynapses.org> | 2010-03-29 23:20:22 +0200 |
commit | dc3d9bb2ab96ecdb6bcbb4c83ddae9e149f5fd7e (patch) | |
tree | 56c381d517b149eb8aca81b4aac3d4ab573a66bf /cmake/Modules | |
parent | fd4ed3909e824a798fb61d3e484654bdd7eecb57 (diff) | |
download | libssh-dc3d9bb2ab96ecdb6bcbb4c83ddae9e149f5fd7e.tar.gz libssh-dc3d9bb2ab96ecdb6bcbb4c83ddae9e149f5fd7e.tar.xz libssh-dc3d9bb2ab96ecdb6bcbb4c83ddae9e149f5fd7e.zip |
Fixed GCrypt find module.
Diffstat (limited to 'cmake/Modules')
-rw-r--r-- | cmake/Modules/FindGCrypt.cmake | 34 |
1 files changed, 10 insertions, 24 deletions
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 <mail@cynapses.org> +# Copyright (c) 2009-2010 Andreas Schneider <mail@cynapses.org> # # 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) |