diff options
author | Brad King <brad.king@kitware.com> | 2022-07-28 12:14:18 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2022-07-28 12:14:34 (GMT) |
commit | 8b6fdc544560945b968285cc0ee89ec2d73403af (patch) | |
tree | 0fbd8f08df9fd72f89d436e41a98d8fdbeb35c32 /Modules | |
parent | b0273dc26f1fb99090e4bcd44dd38549fc14881d (diff) | |
parent | 0b7ae2af0d5318830d59deb9306ad29bce3233c8 (diff) | |
download | CMake-8b6fdc544560945b968285cc0ee89ec2d73403af.zip CMake-8b6fdc544560945b968285cc0ee89ec2d73403af.tar.gz CMake-8b6fdc544560945b968285cc0ee89ec2d73403af.tar.bz2 |
Merge topic 'FindCURL-version-string'
0b7ae2af0d FindCURL: Fix version string in case of multiple curl installations
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7515
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/FindCURL.cmake | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Modules/FindCURL.cmake b/Modules/FindCURL.cmake index 279e263..acb87dc 100644 --- a/Modules/FindCURL.cmake +++ b/Modules/FindCURL.cmake @@ -82,7 +82,6 @@ find_package(PkgConfig QUIET) if(PKG_CONFIG_FOUND) pkg_check_modules(PC_CURL QUIET libcurl) if(PC_CURL_FOUND) - set(CURL_VERSION_STRING ${PC_CURL_VERSION}) pkg_get_variable(CURL_SUPPORTED_PROTOCOLS libcurl supported_protocols) pkg_get_variable(CURL_SUPPORTED_FEATURES libcurl supported_features) endif() @@ -122,7 +121,7 @@ if(NOT CURL_LIBRARY) select_library_configurations(CURL) endif() -if(CURL_INCLUDE_DIR AND NOT CURL_VERSION_STRING) +if(CURL_INCLUDE_DIR) foreach(_curl_version_header curlver.h curl.h) if(EXISTS "${CURL_INCLUDE_DIR}/curl/${_curl_version_header}") file(STRINGS "${CURL_INCLUDE_DIR}/curl/${_curl_version_header}" curl_version_str REGEX "^#define[\t ]+LIBCURL_VERSION[\t ]+\".*\"") |