فهرست منبع

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.
makise-homura 3 سال پیش
والد
کامیت
886ba0b1d6
1فایلهای تغییر یافته به همراه2 افزوده شده و 0 حذف شده
  1. 2 0
      Modules/FindCURL.cmake

+ 2 - 0
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()