From 9a184e0bb149631ee5e080aecb609eef2e7869f1 Mon Sep 17 00:00:00 2001 From: Benoit Neil Date: Thu, 2 Apr 2009 23:12:22 +0000 Subject: Added basic OpenSSL support in CMake scripts (Thanks to Bill Hoffman) --- CMakeLists.txt | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 158215d2a..a3d2db21d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -187,8 +187,19 @@ CHECK_LIBRARY_EXISTS_CONCAT("winmm" getch HAVE_LIBWINMM) OPTION(CMAKE_USE_OPENSSL "Use OpenSSL code. Experimental" ON) MARK_AS_ADVANCED(CMAKE_USE_OPENSSL) IF(CMAKE_USE_OPENSSL) - CHECK_LIBRARY_EXISTS_CONCAT("crypto" CRYPTO_lock HAVE_LIBCRYPTO) - CHECK_LIBRARY_EXISTS_CONCAT("ssl" SSL_connect HAVE_LIBSSL) + IF(WIN32) + FIND_PACKAGE(OpenSSL) + IF(OPENSSL_FOUND) + SET(USE_SSLEAY TRUE) + SET(USE_OPENSSL TRUE) + LIST(APPEND CURL_LIBS ${OPENSSL_LIBRARIES} ) + ENDIF() + #FIND_LIBRARY(LIBEAY NAMES libeay32) + #LIST(APPEND CURL_LIBS ${LIBEAY} ) + ELSE(WIN32) + CHECK_LIBRARY_EXISTS_CONCAT("crypto" CRYPTO_lock HAVE_LIBCRYPTO) + CHECK_LIBRARY_EXISTS_CONCAT("ssl" SSL_connect HAVE_LIBSSL) + ENDIF(WIN32) ENDIF(CMAKE_USE_OPENSSL) # Check for idn -- cgit v1.2.3