diff options
author | Ashley Whetter <ashleyw@activestate.com> | 2019-12-31 23:01:35 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-01-16 15:53:19 (GMT) |
commit | d2880aaa0601567bba8dba9b5da819362c79d990 (patch) | |
tree | bd2e601cb8d38c68dd65681ebe99313b37e647c0 | |
parent | 512ab500f06d6c645985cc8014c5e6291b9a059f (diff) | |
download | CMake-d2880aaa0601567bba8dba9b5da819362c79d990.zip CMake-d2880aaa0601567bba8dba9b5da819362c79d990.tar.gz CMake-d2880aaa0601567bba8dba9b5da819362c79d990.tar.bz2 |
FindOpenSSL: Fix ordering of dependency link flags
Fixes: #20082, #20224
-rw-r--r-- | Modules/FindOpenSSL.cmake | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/Modules/FindOpenSSL.cmake b/Modules/FindOpenSSL.cmake index 33ceab7..478a592 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() @@ -338,13 +338,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) @@ -414,9 +415,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 |