e56915bad9
would only work on platforms where the required path got set for another package svn path=/trunk/; revision=52350
45 lines
1.2 KiB
CMake
45 lines
1.2 KiB
CMake
#
|
|
# $Id$
|
|
#
|
|
# - Find gcrypt
|
|
# Find the native GCRYPT includes and library
|
|
#
|
|
# GCRYPT_INCLUDE_DIRS - where to find gcrypt.h, etc.
|
|
# GCRYPT_LIBRARIES - List of libraries when using gcrypt.
|
|
# GCRYPT_FOUND - True if gcrypt found.
|
|
|
|
|
|
IF (GCRYPT_INCLUDE_DIRS)
|
|
# Already in cache, be silent
|
|
SET(GCRYPT_FIND_QUIETLY TRUE)
|
|
ENDIF (GCRYPT_INCLUDE_DIRS)
|
|
|
|
INCLUDE(FindWSWinLibs)
|
|
FindWSWinLibs("gnutls-.*" "GCRYPT_HINTS")
|
|
|
|
FIND_PATH(GCRYPT_INCLUDE_DIR gcrypt.h
|
|
HINTS
|
|
"${GCRYPT_HINTS}"
|
|
PATH_SUFFIXES
|
|
include
|
|
)
|
|
|
|
SET(GCRYPT_NAMES gcrypt libgcrypt-11)
|
|
FIND_LIBRARY(GCRYPT_LIBRARY NAMES ${GCRYPT_NAMES} HINTS "${GCRYPT_HINTS}/bin")
|
|
FIND_LIBRARY(GCRYPT_ERROR_LIBRARY NAMES gpg-error libgpg-error-0 HINTS "${GCRYPT_HINTS}/bin")
|
|
|
|
# handle the QUIETLY and REQUIRED arguments and set GCRYPT_FOUND to TRUE if
|
|
# all listed variables are TRUE
|
|
INCLUDE(FindPackageHandleStandardArgs)
|
|
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GCRYPT DEFAULT_MSG GCRYPT_LIBRARY GCRYPT_INCLUDE_DIR)
|
|
|
|
IF(GCRYPT_FOUND)
|
|
SET( GCRYPT_LIBRARIES ${GCRYPT_LIBRARY} ${GCRYPT_ERROR_LIBRARY})
|
|
SET( GCRYPT_INCLUDE_DIRS ${GCRYPT_INCLUDE_DIR})
|
|
ELSE(GCRYPT_FOUND)
|
|
SET( GCRYPT_LIBRARIES )
|
|
SET( GCRYPT_INCLUDE_DIRS )
|
|
ENDIF(GCRYPT_FOUND)
|
|
|
|
MARK_AS_ADVANCED( GCRYPT_LIBRARIES GCRYPT_INCLUDE_DIRS )
|