From 886ba0b1d6a57e7f41a3a9dcd3389166333fb837 Mon Sep 17 00:00:00 2001 From: makise-homura Date: Thu, 23 Jun 2022 23:38:40 +0300 Subject: 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. --- Modules/FindCURL.cmake | 2 ++ 1 file changed, 2 insertions(+) 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() -- cgit v0.12