curl: Use find_package(OpenSSL)
Change the code to use the standard CMake FindOpenSSL instead of the handcrafted attempt that was there before.
This commit is contained in:
parent
2da17ef797
commit
c2f47590ef
|
@ -169,22 +169,14 @@ IF(NOT CURL_SPECIAL_LIBZ)
|
|||
CHECK_LIBRARY_EXISTS_CONCAT("z" inflateEnd HAVE_LIBZ)
|
||||
ENDIF(NOT CURL_SPECIAL_LIBZ)
|
||||
|
||||
OPTION(CMAKE_USE_OPENSSL "Use OpenSSL code." OFF)
|
||||
OPTION(CMAKE_USE_OPENSSL "Use OpenSSL code with curl." OFF)
|
||||
MARK_AS_ADVANCED(CMAKE_USE_OPENSSL)
|
||||
IF(CMAKE_USE_OPENSSL)
|
||||
SET(USE_SSLEAY TRUE)
|
||||
SET(USE_OPENSSL TRUE)
|
||||
IF(WIN32)
|
||||
FIND_PATH(SSLINCLUDE openssl/crypto.h
|
||||
PATHS c:/hoffman/Tools/openssl_w32vc6-0.9.8g/inc32)
|
||||
INCLUDE_DIRECTORIES(${SSLINCLUDE})
|
||||
FIND_LIBRARY(LIBEAY NAMES libeay32)
|
||||
FIND_LIBRARY(SSLEAY NAMES ssleay32)
|
||||
SET(CURL_LIBS ${CURL_LIBS} ${LIBEAY} ${SSLEAY} )
|
||||
ELSE(WIN32)
|
||||
CHECK_LIBRARY_EXISTS_CONCAT("crypto" CRYPTO_lock HAVE_LIBCRYPTO)
|
||||
CHECK_LIBRARY_EXISTS_CONCAT("ssl" SSL_connect HAVE_LIBSSL)
|
||||
ENDIF(WIN32)
|
||||
FIND_PACKAGE(OpenSSL REQUIRED)
|
||||
INCLUDE_DIRECTORIES(${OPENSSL_INCLUDE_DIR})
|
||||
SET(CURL_LIBS ${CURL_LIBS} ${OPENSSL_LIBRARIES})
|
||||
SET(CURL_CA_BUNDLE "" CACHE FILEPATH "Path to SSL CA Certificate Bundle")
|
||||
MARK_AS_ADVANCED(CURL_CA_BUNDLE)
|
||||
IF(CURL_CA_BUNDLE)
|
||||
|
|
|
@ -255,9 +255,6 @@
|
|||
/* Define to 1 if you have the <libssh2.h> header file. */
|
||||
#cmakedefine HAVE_LIBSSH2_H ${HAVE_LIBSSH2_H}
|
||||
|
||||
/* Define to 1 if you have the `ssl' library (-lssl). */
|
||||
#cmakedefine HAVE_LIBSSL ${HAVE_LIBSSL}
|
||||
|
||||
/* if zlib is available */
|
||||
#cmakedefine HAVE_LIBZ ${HAVE_LIBZ}
|
||||
|
||||
|
|
Loading…
Reference in New Issue