Skip to content
Snippets Groups Projects
Commit d0061378 authored by Brad King's avatar Brad King Committed by Kitware Robot
Browse files

Merge topic 'findopenssl-static-findpkg-fix'


652f34ea FindOpenSSL: Use static pkgconfig if OPENSSL_USE_STATIC_LIBS=ON

Acked-by: default avatarKitware Robot <kwrobot@kitware.com>
Tested-by: default avatarbuildbot <buildbot@kitware.com>
Merge-request: !8174
parents a77d1c0c 652f34ea
No related branches found
No related tags found
No related merge requests found
......@@ -118,9 +118,14 @@ macro(_OpenSSL_test_and_find_dependencies ssl_library crypto_library)
("${crypto_library}" MATCHES "\\${CMAKE_STATIC_LIBRARY_SUFFIX}$")))
set(_OpenSSL_has_dependencies TRUE)
unset(_OpenSSL_has_dependency_zlib)
if(_OPENSSL_LIBRARIES)
if(OPENSSL_USE_STATIC_LIBS)
set(_OpenSSL_libs "${_OPENSSL_STATIC_LIBRARIES}")
else()
set(_OpenSSL_libs "${_OPENSSL_LIBRARIES}")
endif()
if(_OpenSSL_libs)
unset(_OpenSSL_has_dependency_dl)
foreach(_OPENSSL_DEP_LIB IN LISTS _OPENSSL_LIBRARIES)
foreach(_OPENSSL_DEP_LIB IN LISTS _OpenSSL_libs)
if (_OPENSSL_DEP_LIB STREQUAL "ssl" OR _OPENSSL_DEP_LIB STREQUAL "crypto")
# ignoring: these are the targets
elseif(_OPENSSL_DEP_LIB STREQUAL CMAKE_DL_LIBS)
......@@ -137,6 +142,7 @@ macro(_OpenSSL_test_and_find_dependencies ssl_library crypto_library)
set(_OpenSSL_has_dependency_dl TRUE)
find_package(Threads)
endif()
unset(_OpenSSL_libs)
else()
set(_OpenSSL_has_dependencies FALSE)
endif()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment