aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAris Adamantiadis <aris@0xbadc0de.be>2009-09-25 23:31:48 +0200
committerAris Adamantiadis <aris@0xbadc0de.be>2009-09-25 23:31:48 +0200
commit74b7fb7bbac618419e5e40a2df0beb2304aa84ad (patch)
treed7eb98e9938334b75402ba5ea8878cfb163f039b
parentc70694c5948a2d62a3411927a226bac51eefd7d5 (diff)
downloadlibssh-74b7fb7bbac618419e5e40a2df0beb2304aa84ad.tar.gz
libssh-74b7fb7bbac618419e5e40a2df0beb2304aa84ad.tar.xz
libssh-74b7fb7bbac618419e5e40a2df0beb2304aa84ad.zip
Add an option to let users choose libgcrypt
-rw-r--r--CMakeLists.txt18
-rw-r--r--DefineOptions.cmake1
2 files changed, 13 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ea40ecc3..210512b6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -38,14 +38,20 @@ include(MacroCopyFile)
# search for libraries
find_package(ZLIB REQUIRED)
-find_package(OpenSSL)
-
-if (NOT CRYPTO_FOUND)
- find_package(GCrypt)
+if (WITH_GCRYPT)
+ find_package(GCrypt REQUIRED)
if (NOT GCRYPT_FOUND)
- message(FATAL_ERROR "Could not find OpenSSL or GCrypt")
+ message(FATAL_ERROR "Could not find GCrypt")
endif (NOT GCRYPT_FOUND)
-endif (NOT CRYPTO_FOUND)
+else (WITH_GCRYPT)
+ find_package(OpenSSL)
+ if (NOT CRYPTO_FOUND)
+ find_package(GCrypt)
+ if (NOT GCRYPT_FOUND)
+ message(FATAL_ERROR "Could not find OpenSSL or GCrypt")
+ endif (NOT GCRYPT_FOUND)
+ endif (NOT CRYPTO_FOUND)
+endif(WITH_GCRYPT)
# config.h checks
include(ConfigureChecks.cmake)
diff --git a/DefineOptions.cmake b/DefineOptions.cmake
index 0fb25876..bec65614 100644
--- a/DefineOptions.cmake
+++ b/DefineOptions.cmake
@@ -5,3 +5,4 @@ option(WITH_SERVER "Build with SSH server support" ON)
option(WITH_STATIC_LIB "Build with a static library" OFF)
option(WITH_DEBUG_CRYPTO "Build with cryto debug output" OFF)
option(WITH_DEBUG_CALLTRACE "Build with calltrace debug output" ON)
+option(WITH_GCRYPT "Compile against libgcrypt" OFF)