=== modified file 'CMakeLists.txt' --- CMakeLists.txt 2009-05-25 19:43:46 +0000 +++ CMakeLists.txt 2009-05-25 19:54:56 +0000 @@ -38,14 +38,24 @@ # search for libraries find_package(ZLIB REQUIRED) -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) +option(WITH_GCRYPT "Prefer GCcrypt over OpenSSL" "AUTO") + +if (WITH_GCRYPT STREQUAL "AUTO") + find_package(OpenSSL) + if (NOT CRYPTO_FOUND) + find_package(GCrypt) + endif (NOT CRYPTO_FOUND) +else () + if (WITH_GCRYPT) + find_package(GCrypt) + else (WITH_GCRYPT) + find_package(OpenSSL) + endif (WITH_GCRYPT) +endif (WITH_GCRYPT STREQUAL "AUTO") + +if (NOT CRYPTO_FOUND AND NOT GCRYPT_FOUND) + message(FATAL_ERROR "Could not find OpenSSL or GCrypt") +endif (NOT CRYPTO_FOUND AND NOT GCRYPT_FOUND) # config.h checks include(ConfigureChecks.cmake)