diff options
author | makise-homura <akemi_homura@kurisa.ch> | 2022-06-23 20:38:40 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-06-28 15:15:24 (GMT) |
commit | 886ba0b1d6a57e7f41a3a9dcd3389166333fb837 (patch) | |
tree | 931a6fbd17d58c6b20362058548ad62317196a92 /Modules/FindCURL.cmake | |
parent | 31cbe200f3f047a5e62fb851a2757f39dbf05c78 (diff) | |
download | CMake-886ba0b1d6a57e7f41a3a9dcd3389166333fb837.zip CMake-886ba0b1d6a57e7f41a3a9dcd3389166333fb837.tar.gz CMake-886ba0b1d6a57e7f41a3a9dcd3389166333fb837.tar.bz2 |
FindCURL: Set CURL_VERSION_STRING when curl is found as a package
FindCURL, when found as `curl-config.cmake`, will fill `CURL_VERSION`
instead of `CURL_VERSION_STRING` variable. It may break some cases
when user is relying on correct value of the latter variable, and
as an example, already breaks `CMakeOnly.AllFindModules` test.
Diffstat (limited to 'Modules/FindCURL.cmake')
-rw-r--r-- | Modules/FindCURL.cmake | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Modules/FindCURL.cmake b/Modules/FindCURL.cmake index e37d225..279e263 100644 --- a/Modules/FindCURL.cmake +++ b/Modules/FindCURL.cmake @@ -72,6 +72,8 @@ if(NOT CURL_NO_CURL_CMAKE) # can print what we found and return. if(CURL_FOUND) find_package_handle_standard_args(CURL HANDLE_COMPONENTS CONFIG_MODE) + # The upstream curl package sets CURL_VERSION, not CURL_VERSION_STRING. + set(CURL_VERSION_STRING "${CURL_VERSION}") return() endif() endif() |