summaryrefslogtreecommitdiffstats
path: root/Modules/FindOpenSSL.cmake
diff options
context:
space:
mode:
authorAshley Whetter <ashleyw@activestate.com>2019-12-31 23:01:35 (GMT)
committerAshley Whetter <ashleyw@activestate.com>2019-12-31 23:01:35 (GMT)
commit90973c4abd62528fc916601604737f73931b4c46 (patch)
treef4d817adb75287ec3210055e6df12bb74f434caf /Modules/FindOpenSSL.cmake
parenta07134e33934bdd4b50d2a4d3293fcd3f495a3d6 (diff)
downloadCMake-90973c4abd62528fc916601604737f73931b4c46.zip
CMake-90973c4abd62528fc916601604737f73931b4c46.tar.gz
CMake-90973c4abd62528fc916601604737f73931b4c46.tar.bz2
FindOpenSSL: Fix ordering of dependency link flags
Fixes: #20082
Diffstat (limited to 'Modules/FindOpenSSL.cmake')
-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