Add an option to let users choose libgcrypt

This commit is contained in:
Aris Adamantiadis 2009-09-25 23:31:48 +02:00
parent c70694c594
commit 74b7fb7bba
2 changed files with 13 additions and 6 deletions

View File

@ -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)

View File

@ -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)