diff options
author | Brad King <brad.king@kitware.com> | 2014-12-18 15:16:29 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2014-12-18 15:16:29 (GMT) |
commit | bdf278ad5f9029dc7b63469106db808e20a8ca8c (patch) | |
tree | 5b17dde0632c1bf728d1e2e429ef3e17abad4f2f | |
parent | 2a45da6ea4ea2548258ef550afb3dd3cf1475b4f (diff) | |
parent | e4563257ba66266017fadf24c1b97fd103a138e4 (diff) | |
download | CMake-bdf278ad5f9029dc7b63469106db808e20a8ca8c.zip CMake-bdf278ad5f9029dc7b63469106db808e20a8ca8c.tar.gz CMake-bdf278ad5f9029dc7b63469106db808e20a8ca8c.tar.bz2 |
Merge topic 'curl-darwinssl'
e4563257 curl: Use OS X SSL/TLS native implementation
-rw-r--r-- | Help/release/dev/curl-darwinssl.rst | 9 | ||||
-rw-r--r-- | Utilities/cmcurl/CMakeLists.txt | 19 |
2 files changed, 28 insertions, 0 deletions
diff --git a/Help/release/dev/curl-darwinssl.rst b/Help/release/dev/curl-darwinssl.rst new file mode 100644 index 0000000..3571bd1 --- /dev/null +++ b/Help/release/dev/curl-darwinssl.rst @@ -0,0 +1,9 @@ +curl-darwinssl +-------------- + +* On OS X, commands supporting network communication, such as + :command:`file(DOWNLOAD)`, :command:`file(UPLOAD)`, and + :command:`ctest_submit`, now support SSL/TLS even when CMake + is not built against OpenSSL. The OS X native SSL/TLS + implementation is used by default. OS-configured certificate + authorities will be trusted automatically. diff --git a/Utilities/cmcurl/CMakeLists.txt b/Utilities/cmcurl/CMakeLists.txt index 1092e48..0db741e 100644 --- a/Utilities/cmcurl/CMakeLists.txt +++ b/Utilities/cmcurl/CMakeLists.txt @@ -464,6 +464,25 @@ elseif(WIN32) # Use Windows SSL/TLS native implementation. add_definitions(-DUSE_SCHANNEL) set(USE_WINDOWS_SSPI 1) +elseif(APPLE) + # Use OS X SSL/TLS native implementation if available on target version. + if(CMAKE_OSX_DEPLOYMENT_TARGET) + set(OSX_VERSION ${CMAKE_OSX_DEPLOYMENT_TARGET}) + else() + execute_process( + COMMAND sw_vers -productVersion + OUTPUT_VARIABLE OSX_VERSION + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + endif() + if(NOT OSX_VERSION VERSION_LESS 10.6 AND + CMAKE_C_COMPILER_ID MATCHES "GNU|Clang|AppleClang") + add_definitions(-DUSE_DARWINSSL) + list(APPEND CURL_LIBS + "-framework CoreFoundation" + "-framework Security" + ) + endif() endif() #libSSH2 |