aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt4
-rw-r--r--ConfigureChecks.cmake4
-rw-r--r--cmake/Modules/FindOpenSSL.cmake14
3 files changed, 14 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c24bf6b6..d935827f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -40,12 +40,12 @@ find_package(ZLIB REQUIRED)
find_package(OpenSSL)
-if (NOT CRYPTO_LIBRARY)
+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_LIBRARY)
+endif (NOT CRYPTO_FOUND)
# config.h checks
include(ConfigureChecks.cmake)
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
index 1d4761ae..0b1629ef 100644
--- a/ConfigureChecks.cmake
+++ b/ConfigureChecks.cmake
@@ -37,9 +37,9 @@ else (WIN32)
endif (WIN32)
# LIBRARIES
-if (CRYPTO_LIBRARY)
+if (CRYPTO_FOUND)
set(HAVE_LIBCRYPTO 1)
-endif (CRYPTO_LIBRARY)
+endif (CRYPTO_FOUND)
if (GCRYPT_FOUND)
set(HAVE_LIBGCRYPT 1)
diff --git a/cmake/Modules/FindOpenSSL.cmake b/cmake/Modules/FindOpenSSL.cmake
index 85c7473e..1943c666 100644
--- a/cmake/Modules/FindOpenSSL.cmake
+++ b/cmake/Modules/FindOpenSSL.cmake
@@ -91,16 +91,19 @@ else (OPENSSL_LIBRARIES AND OPENSSL_INCLUDE_DIRS)
mark_as_advanced(CRYPTO_LIBRARY)
if (SSL_LIBRARY)
- set(SSL_FOUND TRUE)
+ set(SSL_FOUND TRUE CACHE INTERNAL "Wether the ssl library has been found" FORCE)
endif (SSL_LIBRARY)
+
if (SSLEAY32_LIBRARY)
- set(SSLEAY32_FOUND TRUE)
+ set(SSLEAY32_FOUND TRUE CACHE INTERNAL "Wether the ssleay32 library has been found" FORCE)
endif (SSLEAY32_LIBRARY)
+
if (SSLEAY32MD_LIBRARY)
- set(SSLEAY32MD_FOUND TRUE)
+ set(SSLEAY32MD_FOUND TRUE CACHE INTERNAL "Wether the ssleay32MD library has been found" FORCE)
endif (SSLEAY32MD_LIBRARY)
+
if (CRYPTO_LIBRARY)
- set(CRYPTO_FOUND TRUE)
+ set(CRYPTO_FOUND TRUE CACHE INTERNAL "Wether the crypto library has been found" FORCE)
endif (CRYPTO_LIBRARY)
set(OPENSSL_INCLUDE_DIRS
@@ -113,18 +116,21 @@ else (OPENSSL_LIBRARIES AND OPENSSL_INCLUDE_DIRS)
${SSL_LIBRARY}
)
endif (SSL_FOUND)
+
if (SSLEAY32_FOUND)
set(OPENSSL_LIBRARIES
${OPENSSL_LIBRARIES}
${SSLEAY32_LIBRARY}
)
endif (SSLEAY32_FOUND)
+
if (SSLEAY32MD_FOUND)
set(OPENSSL_LIBRARIES
${OPENSSL_LIBRARIES}
${SSLEAY32MD_LIBRARY}
)
endif (SSLEAY32MD_FOUND)
+
if (CRYPTO_FOUND)
set(OPENSSL_LIBRARIES
${OPENSSL_LIBRARIES}