summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-01-10 18:10:36 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-01-10 18:10:42 (GMT)
commit9f2719b31e66f6a91112a8382b3faeed13f8c65b (patch)
treeb89d860aac55290c3e5c1c579ec4131f7efdc2ef /Modules
parent3795dea6f1d4ca9bc1a2131173ed190f6c362fbe (diff)
parent90973c4abd62528fc916601604737f73931b4c46 (diff)
downloadCMake-9f2719b31e66f6a91112a8382b3faeed13f8c65b.zip
CMake-9f2719b31e66f6a91112a8382b3faeed13f8c65b.tar.gz
CMake-9f2719b31e66f6a91112a8382b3faeed13f8c65b.tar.bz2
Merge topic 'findopenssl-dependencies-link-order'
90973c4abd FindOpenSSL: Fix ordering of dependency link flags Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4173
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindOpenSSL.cmake12
1 files changed, 5 insertions, 7 deletions
diff --git a/Modules/FindOpenSSL.cmake b/Modules/FindOpenSSL.cmake
index 3688ae9..043fc6c 100644
--- a/Modules/FindOpenSSL.cmake
+++ b/Modules/FindOpenSSL.cmake
@@ -65,7 +65,7 @@ macro(_OpenSSL_test_and_find_dependencies ssl_library crypto_library)
endif()
endmacro()
-function(_OpenSSL_add_dependencies libraries_var library)
+function(_OpenSSL_add_dependencies libraries_var)
if(CMAKE_THREAD_LIBS_INIT)
list(APPEND ${libraries_var} ${CMAKE_THREAD_LIBS_INIT})
endif()
@@ -341,13 +341,14 @@ else()
endif()
-# compat defines
set(OPENSSL_SSL_LIBRARIES ${OPENSSL_SSL_LIBRARY})
set(OPENSSL_CRYPTO_LIBRARIES ${OPENSSL_CRYPTO_LIBRARY})
+set(OPENSSL_LIBRARIES ${OPENSSL_SSL_LIBRARIES} ${OPENSSL_CRYPTO_LIBRARIES} )
_OpenSSL_test_and_find_dependencies("${OPENSSL_SSL_LIBRARY}" "${OPENSSL_CRYPTO_LIBRARY}")
if(_OpenSSL_has_dependencies)
- _OpenSSL_add_dependencies( OPENSSL_SSL_LIBRARIES "${OPENSSL_SSL_LIBRARY}" )
- _OpenSSL_add_dependencies( OPENSSL_CRYPTO_LIBRARIES "${OPENSSL_CRYPTO_LIBRARY}" )
+ _OpenSSL_add_dependencies( OPENSSL_SSL_LIBRARIES )
+ _OpenSSL_add_dependencies( OPENSSL_CRYPTO_LIBRARIES )
+ _OpenSSL_add_dependencies( OPENSSL_LIBRARIES )
endif()
function(from_hex HEX DEC)
@@ -417,9 +418,6 @@ if(OPENSSL_INCLUDE_DIR AND EXISTS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h")
endif ()
endif ()
-set(OPENSSL_LIBRARIES ${OPENSSL_SSL_LIBRARIES} ${OPENSSL_CRYPTO_LIBRARIES} )
-list(REMOVE_DUPLICATES OPENSSL_LIBRARIES)
-
foreach(_comp IN LISTS OpenSSL_FIND_COMPONENTS)
if(_comp STREQUAL "Crypto")
if(EXISTS "${OPENSSL_INCLUDE_DIR}" AND