summaryrefslogtreecommitdiffstats
path: root/Utilities
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2012-09-05 21:25:44 (GMT)
committerBrad King <brad.king@kitware.com>2012-09-07 15:03:19 (GMT)
commitc2f47590ef4fb937a5baa4d4b9e0f364e812d407 (patch)
tree9320fc6d769db236ec37eec5117607bbab534180 /Utilities
parent2da17ef7975b521abe2be4736569d19ef79dc3be (diff)
downloadCMake-c2f47590ef4fb937a5baa4d4b9e0f364e812d407.zip
CMake-c2f47590ef4fb937a5baa4d4b9e0f364e812d407.tar.gz
CMake-c2f47590ef4fb937a5baa4d4b9e0f364e812d407.tar.bz2
curl: Use find_package(OpenSSL)
Change the code to use the standard CMake FindOpenSSL instead of the handcrafted attempt that was there before.
Diffstat (limited to 'Utilities')
-rw-r--r--Utilities/cmcurl/CMakeLists.txt16
-rw-r--r--Utilities/cmcurl/config.h.in3
2 files changed, 4 insertions, 15 deletions
diff --git a/Utilities/cmcurl/CMakeLists.txt b/Utilities/cmcurl/CMakeLists.txt
index caa44f1..7eb16d3 100644
--- a/Utilities/cmcurl/CMakeLists.txt
+++ b/Utilities/cmcurl/CMakeLists.txt
@@ -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)
diff --git a/Utilities/cmcurl/config.h.in b/Utilities/cmcurl/config.h.in
index 6e74935..e18af8f 100644
--- a/Utilities/cmcurl/config.h.in
+++ b/Utilities/cmcurl/config.h.in
@@ -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}