diff options
author | Curl Upstream <curl-library@cool.haxx.se> | 2018-10-30 16:54:00 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-10-31 13:41:28 (GMT) |
commit | 9835e9075037db3d23ade0ef865c562b08cf6023 (patch) | |
tree | 004b65c185c842dadac199a1ecca1de6bda566a0 /CMake | |
parent | 18812a9c3d395b368d8f3d85394b346472c8e858 (diff) | |
download | CMake-9835e9075037db3d23ade0ef865c562b08cf6023.zip CMake-9835e9075037db3d23ade0ef865c562b08cf6023.tar.gz CMake-9835e9075037db3d23ade0ef865c562b08cf6023.tar.bz2 |
curl 2018-10-30 (19667715)
Code extracted from:
https://github.com/curl/curl.git
at commit 196677150f711a96c38ed123e621f1d4e995b2e5 (curl-7_62_0).
Diffstat (limited to 'CMake')
-rw-r--r-- | CMake/CMakeConfigurableFile.in | 1 | ||||
-rw-r--r-- | CMake/CurlTests.c | 16 | ||||
-rw-r--r-- | CMake/curl-config.cmake.in | 66 |
3 files changed, 23 insertions, 60 deletions
diff --git a/CMake/CMakeConfigurableFile.in b/CMake/CMakeConfigurableFile.in index 4cf74a1..df2c382 100644 --- a/CMake/CMakeConfigurableFile.in +++ b/CMake/CMakeConfigurableFile.in @@ -1,2 +1 @@ @CMAKE_CONFIGURABLE_FILE_CONTENT@ - diff --git a/CMake/CurlTests.c b/CMake/CurlTests.c index ab244ac..9388c83 100644 --- a/CMake/CurlTests.c +++ b/CMake/CurlTests.c @@ -549,3 +549,19 @@ main() { return 0; } #endif +#ifdef HAVE_CLOCK_GETTIME_MONOTONIC +#include <time.h> +int +main() { + struct timespec ts = {0, 0}; + clock_gettime(CLOCK_MONOTONIC, &ts); + return 0; +} +#endif +#ifdef HAVE_BUILTIN_AVAILABLE +int +main() { + if(__builtin_available(macOS 10.12, *)) {} + return 0; +} +#endif diff --git a/CMake/curl-config.cmake.in b/CMake/curl-config.cmake.in index 73e04c6..1294e17 100644 --- a/CMake/curl-config.cmake.in +++ b/CMake/curl-config.cmake.in @@ -1,64 +1,12 @@ - -get_filename_component(_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) - -if(NOT CURL_FIND_COMPONENTS) - set(CURL_FIND_COMPONENTS curl libcurl) - if(CURL_FIND_REQUIRED) - set(CURL_FIND_REQUIRED_curl TRUE) - set(CURL_FIND_REQUIRED_libcurl TRUE) - endif() -endif() +@PACKAGE_INIT@ include(CMakeFindDependencyMacro) -if(CURL_FIND_REQUIRED_libcurl) - find_dependency(OpenSSL "@OPENSSL_VERSION_MAJOR@") +if(@USE_OPENSSL@) + find_dependency(OpenSSL @OPENSSL_VERSION_MAJOR@) endif() - -set(_curl_missing_components) -foreach(_comp ${CURL_FIND_COMPONENTS}) - if(EXISTS "${_DIR}/${_comp}-target.cmake") - include("${_DIR}/${_comp}-target.cmake") - set(CURL_${_comp}_FOUND TRUE) - else() - set(CURL_${_comp}_FOUND FALSE) - if(CURL_FIND_REQUIRED_${_comp}) - set(CURL_FOUND FALSE) - list(APPEND _curl_missing_components ${_comp}) - endif() - endif() -endforeach() - -if(_curl_missing_components) - set(CURL_NOT_FOUND_MESSAGE "Following required components not found: " ${_curl_missing_components}) -else() - if(TARGET CURL::libcurl) - string(TOUPPER "${CMAKE_BUILD_TYPE}" _curl_current_config) - if(NOT _curl_current_config) - set(_curl_current_config "NOCONFIG") - endif() - get_target_property(_curl_configurations CURL::libcurl IMPORTED_CONFIGURATIONS) - list(FIND _curl_configurations "${_curl_current_config}" _i) - if(_i LESS 0) - set(_curl_config "RELEASE") - list(FIND _curl_configurations "${_curl_current_config}" _i) - if(_i LESS 0) - set(_curl_config "NOCONFIG") - list(FIND _curl_configurations "${_curl_current_config}" _i) - endif() - endif() - - if(_i LESS 0) - set(_curl_current_config "") # let CMake pick config at random - else() - set(_curl_current_config "_${_curl_current_config}") - endif() - - get_target_property(CURL_INCLUDE_DIRS CURL::libcurl INTERFACE_INCLUDE_DIRECTORIES) - get_target_property(CURL_LIBRARIES CURL::libcurl "LOCATION${_curl_current_config}") - set(_curl_current_config) - set(_curl_configurations) - set(_i) - endif() +if(@USE_ZLIB@) + find_dependency(ZLIB @ZLIB_VERSION_MAJOR@) endif() -unset(_curl_missing_components) +include("${CMAKE_CURRENT_LIST_DIR}/@TARGETS_EXPORT_NAME@.cmake") +check_required_components("@PROJECT_NAME@") |