diff options
author | Felix Geyer <debfx@fobos.de> | 2010-09-11 21:49:30 +0400 |
---|---|---|
committer | Felix Geyer <debfx@fobos.de> | 2010-09-11 21:49:30 +0400 |
commit | 6a2034fa248385d1d1637d4c3444045e50e0c5f5 (patch) | |
tree | 7526ece1e918ea4daa1de072bab37e8d99489980 /cmake | |
parent | f5dd24fdbecb94f07398bacbe8fd905b5c83f806 (diff) |
Add crypto classes and tests. Link to libgcrypt.
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/FindLibgcrypt.cmake | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/cmake/FindLibgcrypt.cmake b/cmake/FindLibgcrypt.cmake new file mode 100644 index 000000000..c12da3707 --- /dev/null +++ b/cmake/FindLibgcrypt.cmake @@ -0,0 +1,30 @@ +# - Try to find the GNU Libgcrypt library +# Once done this will define +# +# LIBGCRYPT_FOUND - system has the Libgcrypt library +# LIBGCRYPT_LIBS - The libraries needed to use Libgcrypt + +# Copyright (c) 2006, Pino Toscano, <toscano.pino@tiscali.it> +# Copyright (c) 2008, Modestas Vainius, <modestas@vainius.eu> +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying LICENSE.BSD file. + +include(CheckIncludeFiles) + +check_include_files(gcrypt.h HAVE_GCRYPT_H) + +if (HAVE_GCRYPT_H) + set(LIBGCRYPT_HEADERS_FOUND TRUE) +endif (HAVE_GCRYPT_H) + +if (LIBGCRYPT_HEADERS_FOUND) + find_library(LIBGCRYPT_LIBS NAMES gcrypt ) +endif (LIBGCRYPT_HEADERS_FOUND) + +if (LIBGCRYPT_LIBS) + set(LIBGCRYPT_FOUND TRUE) + message(STATUS "Libgcrypt found: ${LIBGCRYPT_LIBS}") +elseif (Libgcrypt_FIND_REQUIRED) + message(FATAL_ERROR "Could not find Libgcrypt") +endif (LIBGCRYPT_LIBS) |