diff options
author | Brad King <brad.king@kitware.com> | 2015-01-22 15:15:31 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-01-23 13:57:32 (GMT) |
commit | 0abd3e538eb92259e52c3d330e46dac7aa0be332 (patch) | |
tree | c43acd5147b5120bbbe15522568b899ebab2a9e6 /Source/CMakeLists.txt | |
parent | 6ce346c53c67ba970cd04f0d8436aab006dbec71 (diff) | |
download | CMake-0abd3e538eb92259e52c3d330e46dac7aa0be332.zip CMake-0abd3e538eb92259e52c3d330e46dac7aa0be332.tar.gz CMake-0abd3e538eb92259e52c3d330e46dac7aa0be332.tar.bz2 |
cmake: Use a default CA path when not using system curl
When using system curl, we trust it to be configured with desired CA
certs. When using our own build of curl, we use os-configured CA certs
on Windows and OS X. On other systems, try to achieve this by searching
for common CA cert locations. According to a brief investigation, the
curl packages on popular Linux distros are currently configured as:
* Arch: /etc/ssl/certs/ca-certificates.crt
* Debian with OpenSSL: /etc/ssl/certs
* Debian with GNU TLS: /etc/ssl/certs/ca-certificates.crt
* Debian with NSS: /etc/ssl/certs/ca-certificates.crt
* Fedora: /etc/pki/tls/certs/ca-bundle.crt
* Gentoo with OpenSSL: /etc/ssl/certs
* Gentoo without OpenSSL: /etc/ssl/certs/ca-certificates.crt
Teach CMake and CTest to look for these paths and use them as a CA path
or bundle when no other os-configured or user-specified CAs are
available.
Diffstat (limited to 'Source/CMakeLists.txt')
-rw-r--r-- | Source/CMakeLists.txt | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index c04cf9a..07839f3 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -175,6 +175,8 @@ set(SRCS cmCPackPropertiesGenerator.cxx cmCryptoHash.cxx cmCryptoHash.h + cmCurl.cxx + cmCurl.h cmCustomCommand.cxx cmCustomCommand.h cmCustomCommandGenerator.cxx @@ -497,6 +499,12 @@ if(WIN32 AND NOT CYGWIN) install(TARGETS cmcldeps DESTINATION bin) endif() +foreach(v CURL_CA_BUNDLE CURL_CA_PATH) + if(${v}) + set_property(SOURCE cmCurl.cxx APPEND PROPERTY COMPILE_DEFINITIONS ${v}="${${v}}") + endif() +endforeach() + # create a library used by the command line and the GUI add_library(CMakeLib ${SRCS}) target_link_libraries(CMakeLib cmsys |