diff options
author | Hannes Mezger <hannes.mezger@ascolab.com> | 2014-11-28 14:21:53 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-12-01 14:41:46 (GMT) |
commit | be9bec5df2660661984e080dad9ae7561aa1fe83 (patch) | |
tree | 0d9b1c1812fde80a1406570ac170f7e469452f74 /Modules/FindOpenSSL.cmake | |
parent | 8e75f1d2fa3049ac31f4ebdbc255fca3e6414802 (diff) | |
download | CMake-be9bec5df2660661984e080dad9ae7561aa1fe83.zip CMake-be9bec5df2660661984e080dad9ae7561aa1fe83.tar.gz CMake-be9bec5df2660661984e080dad9ae7561aa1fe83.tar.bz2 |
FindOpenSSL: Report crypto and ssl libraries separately
Some applications only need the OpenSSL crypto library and want to avoid
linking against the SSL library. Set OPENSSL_CRYPTO_LIBRARY and
OPENSSL_SSL_LIBRARY in the code paths that do not need to find them
separately, and document them publicly. This allows applications to be
more specific when linking against OpenSSL.
Diffstat (limited to 'Modules/FindOpenSSL.cmake')
-rw-r--r-- | Modules/FindOpenSSL.cmake | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/Modules/FindOpenSSL.cmake b/Modules/FindOpenSSL.cmake index 340b417..b2722a6 100644 --- a/Modules/FindOpenSSL.cmake +++ b/Modules/FindOpenSSL.cmake @@ -16,10 +16,12 @@ # # :: # -# OPENSSL_FOUND - system has the OpenSSL library -# OPENSSL_INCLUDE_DIR - the OpenSSL include directory -# OPENSSL_LIBRARIES - The libraries needed to use OpenSSL -# OPENSSL_VERSION - This is set to $major.$minor.$revision$path (eg. 0.9.8s) +# OPENSSL_FOUND - System has the OpenSSL library +# OPENSSL_INCLUDE_DIR - The OpenSSL include directory +# OPENSSL_CRYPTO_LIBRARY - The OpenSSL crypto library +# OPENSSL_SSL_LIBRARY - The OpenSSL SSL library +# OPENSSL_LIBRARIES - All OpenSSL libraries +# OPENSSL_VERSION - This is set to $major.$minor.$revision$patch (eg. 0.9.8s) #============================================================================= # Copyright 2006-2009 Kitware, Inc. @@ -153,6 +155,8 @@ if(WIN32 AND NOT CYGWIN) mark_as_advanced(LIB_EAY_LIBRARY_DEBUG LIB_EAY_LIBRARY_RELEASE SSL_EAY_LIBRARY_DEBUG SSL_EAY_LIBRARY_RELEASE) + set( OPENSSL_SSL_LIBRARY ${SSL_EAY_LIBRARY} ) + set( OPENSSL_CRYPTO_LIBRARY ${LIB_EAY_LIBRARY} ) set( OPENSSL_LIBRARIES ${SSL_EAY_LIBRARY} ${LIB_EAY_LIBRARY} ) elseif(MINGW) # same player, for MinGW @@ -181,6 +185,8 @@ if(WIN32 AND NOT CYGWIN) ) mark_as_advanced(SSL_EAY LIB_EAY) + set( OPENSSL_SSL_LIBRARY ${SSL_EAY} ) + set( OPENSSL_CRYPTO_LIBRARY ${LIB_EAY} ) set( OPENSSL_LIBRARIES ${SSL_EAY} ${LIB_EAY} ) unset(LIB_EAY_NAMES) unset(SSL_EAY_NAMES) @@ -207,6 +213,8 @@ if(WIN32 AND NOT CYGWIN) ) mark_as_advanced(SSL_EAY LIB_EAY) + set( OPENSSL_SSL_LIBRARY ${SSL_EAY} ) + set( OPENSSL_CRYPTO_LIBRARY ${LIB_EAY} ) set( OPENSSL_LIBRARIES ${SSL_EAY} ${LIB_EAY} ) endif() else() |