summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-12-02 15:21:14 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2014-12-02 15:21:14 (GMT)
commitf39d713af62b4087f059ac0cd861c363d3f45bd3 (patch)
tree654af3ca31bcf57dc4573c9054805f5753380204
parent0d757166fef0f258d1e69f1d63c64612d9f7ecc7 (diff)
parentbe9bec5df2660661984e080dad9ae7561aa1fe83 (diff)
downloadCMake-f39d713af62b4087f059ac0cd861c363d3f45bd3.zip
CMake-f39d713af62b4087f059ac0cd861c363d3f45bd3.tar.gz
CMake-f39d713af62b4087f059ac0cd861c363d3f45bd3.tar.bz2
Merge topic 'FindOpenSSL-separate-libs'
be9bec5d FindOpenSSL: Report crypto and ssl libraries separately
-rw-r--r--Help/release/dev/FindOpenSSL-separate-libs.rst7
-rw-r--r--Modules/FindOpenSSL.cmake16
2 files changed, 19 insertions, 4 deletions
diff --git a/Help/release/dev/FindOpenSSL-separate-libs.rst b/Help/release/dev/FindOpenSSL-separate-libs.rst
new file mode 100644
index 0000000..96e3961
--- /dev/null
+++ b/Help/release/dev/FindOpenSSL-separate-libs.rst
@@ -0,0 +1,7 @@
+FindOpenSSL-separate-libs
+-------------------------
+
+* The :module:`FindOpenSSL` module now reports ``crypto`` and ``ssl``
+ libraries separately in ``OPENSSL_CRYPTO_LIBRARY`` and
+ ``OPENSSL_SSL_LIBRARY``, respectively, to allow applications to
+ link to one without the other.
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()