diff options
author | Andreas Schneider <mail@cynapses.org> | 2009-05-07 15:11:04 +0000 |
---|---|---|
committer | Andreas Schneider <mail@cynapses.org> | 2009-05-07 15:11:04 +0000 |
commit | f29e119c2556db33a337b6317464eb06fe4a9763 (patch) | |
tree | 4a8fd98ff1c28cc726b58dc4c1722cba8d7d5d48 | |
parent | 126dcd51e5d8d418852ab6c74b238a06a45b0bf9 (diff) | |
download | libssh-f29e119c2556db33a337b6317464eb06fe4a9763.tar.gz libssh-f29e119c2556db33a337b6317464eb06fe4a9763.tar.xz libssh-f29e119c2556db33a337b6317464eb06fe4a9763.zip |
Improve OpenSSL cmake checks.
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@752 7dcaeef0-15fb-0310-b436-a5af3365683c
-rw-r--r-- | CMakeLists.txt | 4 | ||||
-rw-r--r-- | ConfigureChecks.cmake | 4 | ||||
-rw-r--r-- | cmake/Modules/FindOpenSSL.cmake | 14 |
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} |