summaryrefslogtreecommitdiffstats
path: root/Utilities
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-01-21 21:42:18 (GMT)
committerBrad King <brad.king@kitware.com>2015-01-23 13:23:52 (GMT)
commit6ce346c53c67ba970cd04f0d8436aab006dbec71 (patch)
tree81cebc87864f4a87d7e89a11d3926231555a3476 /Utilities
parentc99e19a4ac7e6e55345a073b13c36befaa8702d8 (diff)
downloadCMake-6ce346c53c67ba970cd04f0d8436aab006dbec71.zip
CMake-6ce346c53c67ba970cd04f0d8436aab006dbec71.tar.gz
CMake-6ce346c53c67ba970cd04f0d8436aab006dbec71.tar.bz2
curl: Add CURL_CA_PATH option to CMake build process
Move CMAKE_USE_OPENSSL and CURL_CA_BUNDLE up to the top of CMake so that CMake's own sources can know their values. Add the CURL_CA_PATH option at the top and honor it as part of the curl build.
Diffstat (limited to 'Utilities')
-rw-r--r--Utilities/cmcurl/CMakeLists.txt9
-rw-r--r--Utilities/cmcurl/lib/curl_config.h.cmake6
2 files changed, 4 insertions, 11 deletions
diff --git a/Utilities/cmcurl/CMakeLists.txt b/Utilities/cmcurl/CMakeLists.txt
index 0db741e..08bdff5 100644
--- a/Utilities/cmcurl/CMakeLists.txt
+++ b/Utilities/cmcurl/CMakeLists.txt
@@ -425,9 +425,6 @@ endif()
#-----------------------------------------------------------------------------
-option(CMAKE_USE_OPENSSL "Use OpenSSL code. Experimental" OFF)
-mark_as_advanced(CMAKE_USE_OPENSSL)
-
set(USE_SSLEAY OFF)
set(USE_OPENSSL OFF)
set(HAVE_LIBCRYPTO OFF)
@@ -454,11 +451,13 @@ if(CMAKE_USE_OPENSSL)
check_include_file("openssl/rand.h" HAVE_OPENSSL_RAND_H)
# Optionally build with a specific CA cert bundle.
- set(CURL_CA_BUNDLE "" CACHE FILEPATH "Path to SSL CA Certificate Bundle")
- mark_as_advanced(CURL_CA_BUNDLE)
if(CURL_CA_BUNDLE)
add_definitions(-DCURL_CA_BUNDLE="${CURL_CA_BUNDLE}")
endif()
+ # Optionally build with a specific CA cert dir.
+ if(CURL_CA_PATH)
+ add_definitions(-DCURL_CA_PATH="${CURL_CA_PATH}")
+ endif()
endif(OPENSSL_FOUND)
elseif(WIN32)
# Use Windows SSL/TLS native implementation.
diff --git a/Utilities/cmcurl/lib/curl_config.h.cmake b/Utilities/cmcurl/lib/curl_config.h.cmake
index b5db3b6..a561c3d 100644
--- a/Utilities/cmcurl/lib/curl_config.h.cmake
+++ b/Utilities/cmcurl/lib/curl_config.h.cmake
@@ -3,12 +3,6 @@
/* when building libcurl itself */
#cmakedefine BUILDING_LIBCURL 1
-/* Location of default ca bundle */
-#cmakedefine CURL_CA_BUNDLE ${CURL_CA_BUNDLE}
-
-/* Location of default ca path */
-#cmakedefine CURL_CA_PATH ${CURL_CA_PATH}
-
/* to disable cookies support */
#cmakedefine CURL_DISABLE_COOKIES 1