diff options
author | Philipp Kerling <pkerling@casix.org> | 2018-03-15 15:43:53 +0100 |
---|---|---|
committer | Philipp Kerling <pkerling@casix.org> | 2018-03-23 09:38:51 +0100 |
commit | 4e9950b0a0ad9a190fb3c4725817bdda671f5ee7 (patch) | |
tree | 6bf422370b14865709c73b806447737032a193e3 /cmake | |
parent | 6bc1ad9b1f1bcb67bc3d79830488dd259954bff2 (diff) |
Require OpenSSL and consolidate multi-threading initialization
It should make no difference whether curl links OpenSSL statically or
dynamically, and having the same code in two places makes no sense.
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/modules/FindCurl.cmake | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/cmake/modules/FindCurl.cmake b/cmake/modules/FindCurl.cmake index f824e19e52..17c1f0156f 100644 --- a/cmake/modules/FindCurl.cmake +++ b/cmake/modules/FindCurl.cmake @@ -34,43 +34,6 @@ if(CURL_FOUND) set(CURL_INCLUDE_DIRS ${CURL_INCLUDE_DIR}) set(CURL_LIBRARIES ${CURL_LIBRARY}) - # Check whether OpenSSL inside libcurl is static. - if(UNIX) - if(NOT DEFINED HAS_CURL_STATIC AND CURL_LIBRARY MATCHES ".+\.a$" AND PC_CURL_STATIC_LDFLAGS) - set(HAS_CURL_STATIC TRUE) - endif() - if(NOT DEFINED HAS_CURL_STATIC) - get_filename_component(CURL_LIBRARY_DIR ${CURL_LIBRARY} DIRECTORY) - find_soname(CURL REQUIRED) - - if(APPLE) - set(libchecker nm) - set(searchpattern "T [_]?CRYPTO_set_locking_call") - else() - set(libchecker readelf -s) - set(searchpattern "CRYPTO_set_locking_call") - endif() - execute_process( - COMMAND ${libchecker} ${CURL_LIBRARY_DIR}/${CURL_SONAME} - COMMAND grep -Eq ${searchpattern} - RESULT_VARIABLE HAS_CURL_STATIC) - unset(libchecker) - unset(searchpattern) - if(HAS_CURL_STATIC EQUAL 0) - set(HAS_CURL_STATIC TRUE) - else() - set(HAS_CURL_STATIC FALSE) - endif() - set(HAS_CURL_STATIC ${HAS_CURL_STATIC} CACHE INTERNAL - "OpenSSL is statically linked into Curl") - message(STATUS "OpenSSL is statically linked into Curl: ${HAS_CURL_STATIC}") - endif() - endif() - - if(HAS_CURL_STATIC) - set(CURL_DEFINITIONS -DHAS_CURL_STATIC=1) - endif() - if(NOT TARGET Curl::Curl) add_library(Curl::Curl UNKNOWN IMPORTED) set_target_properties(Curl::Curl PROPERTIES |