diff options
author | Brad King <brad.king@kitware.com> | 2020-01-17 14:25:16 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-01-17 14:25:23 (GMT) |
commit | 4c907eae69b4d76b19604dd9cc3bedf1a929828f (patch) | |
tree | 2aa91ccabee7c1f2babed5332d142003cc732368 | |
parent | 8cd35baae9915c4844f97e81bb47d0cba5179e8a (diff) | |
parent | d2880aaa0601567bba8dba9b5da819362c79d990 (diff) | |
download | CMake-4c907eae69b4d76b19604dd9cc3bedf1a929828f.zip CMake-4c907eae69b4d76b19604dd9cc3bedf1a929828f.tar.gz CMake-4c907eae69b4d76b19604dd9cc3bedf1a929828f.tar.bz2 |
Merge topic 'findopenssl-dependencies-link-order' into release-3.16
d2880aaa06 FindOpenSSL: Fix ordering of dependency link flags
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4235
-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 |