5 # Find the native GCRYPT includes and library
7 # GCRYPT_INCLUDE_DIRS - where to find gcrypt.h, etc.
8 # GCRYPT_LIBRARIES - List of libraries when using gcrypt.
9 # GCRYPT_FOUND - True if gcrypt found.
12 IF (GCRYPT_INCLUDE_DIRS)
13 # Already in cache, be silent
14 SET(GCRYPT_FIND_QUIETLY TRUE)
15 ENDIF (GCRYPT_INCLUDE_DIRS)
17 INCLUDE(FindWSWinLibs)
18 FindWSWinLibs("gnutls-.*" "GCRYPT_HINTS")
20 FIND_PATH(GCRYPT_INCLUDE_DIR gcrypt.h
27 SET(GCRYPT_NAMES gcrypt libgcrypt-11)
28 FIND_LIBRARY(GCRYPT_LIBRARY NAMES ${GCRYPT_NAMES} HINTS "${GCRYPT_HINTS}/bin")
29 FIND_LIBRARY(GCRYPT_ERROR_LIBRARY NAMES gpg-error libgpg-error-0 HINTS "${GCRYPT_HINTS}/bin")
31 # handle the QUIETLY and REQUIRED arguments and set GCRYPT_FOUND to TRUE if
32 # all listed variables are TRUE
33 INCLUDE(FindPackageHandleStandardArgs)
34 FIND_PACKAGE_HANDLE_STANDARD_ARGS(GCRYPT DEFAULT_MSG GCRYPT_LIBRARY GCRYPT_INCLUDE_DIR)
37 SET( GCRYPT_LIBRARIES ${GCRYPT_LIBRARY} ${GCRYPT_ERROR_LIBRARY})
38 SET( GCRYPT_INCLUDE_DIRS ${GCRYPT_INCLUDE_DIR})
40 SET( GCRYPT_LIBRARIES )
41 SET( GCRYPT_INCLUDE_DIRS )
44 MARK_AS_ADVANCED( GCRYPT_LIBRARIES GCRYPT_INCLUDE_DIRS )