mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-11 16:32:14 -06:00
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.
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user