diff options
author | Andreas Schneider <asn@cryptomilk.org> | 2012-02-04 20:10:04 +0100 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2012-02-04 20:25:07 +0100 |
commit | 3e83bc665f8e4f2f003fb641548c3e6399741550 (patch) | |
tree | 8b260ede421cc311bb55b7908c840f7d26302355 | |
parent | ddcfe95bbd8daf1775847e38c4f1db3e358e2c23 (diff) | |
download | libssh-3e83bc665f8e4f2f003fb641548c3e6399741550.tar.gz libssh-3e83bc665f8e4f2f003fb641548c3e6399741550.tar.xz libssh-3e83bc665f8e4f2f003fb641548c3e6399741550.zip |
cmake: Enable ECC support for GCrypt 1.5.0 or newer.
-rw-r--r-- | CMakeLists.txt | 2 | ||||
-rw-r--r-- | ConfigureChecks.cmake | 6 | ||||
-rw-r--r-- | config.h.cmake | 3 |
3 files changed, 9 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 7ecad05e..53953b8e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -49,7 +49,7 @@ if (WITH_ZLIB) endif (WITH_ZLIB) if (WITH_GCRYPT) - find_package(GCrypt REQUIRED) + find_package(GCrypt 1.5.0 REQUIRED) if (NOT GCRYPT_FOUND) message(FATAL_ERROR "Could not find GCrypt") endif (NOT GCRYPT_FOUND) diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index 80ab7599..0e4f8958 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -146,7 +146,11 @@ if (OPENSSL_FOUND) endif (OPENSSL_FOUND) if (GCRYPT_FOUND) - set(HAVE_LIBGCRYPT 1) + set(HAVE_LIBGCRYPT 1) + if (GCRYPT_VERSION VERSION_GREATER "1.4.6") + set(HAVE_GCRYPT_ECC 1) + set(HAVE_ECC 1) + endif (GCRYPT_VERSION VERSION_GREATER "1.4.6") endif (GCRYPT_FOUND) if (CMAKE_HAVE_THREADS_LIBRARY) diff --git a/config.h.cmake b/config.h.cmake index 67a6b204..03843e3e 100644 --- a/config.h.cmake +++ b/config.h.cmake @@ -50,6 +50,9 @@ /* Define to 1 if you have eliptic curve cryptography in openssl */ #cmakedefine HAVE_OPENSSL_ECC 1 +/* Define to 1 if you have eliptic curve cryptography in gcrypt */ +#cmakedefine HAVE_GCRYPT_ECC 1 + /* Define to 1 if you have eliptic curve cryptography */ #cmakedefine HAVE_ECC 1 |