curl/CMake
Viktor Szakats aafc074f87
cmake: clear package version after pkg-config detection
`pkg_check_modules()` seems to leave `<PACKAGE>_VERSION` defined with an
empty value, if the package is not found.

When the package is also not found in the fallback branch,
`find_package_handle_standard_args()` logs and error message. In this
message it includes the bogus empty value as: `(found version "")`:
```
Could NOT find Libssh2 (missing: LIBSSH2_INCLUDE_DIR LIBSSH2_LIBRARY) (found version "")
```
https://github.com/curl/curl/actions/runs/11509727553/job/32040378958?pr=15408#step:31:99

Clear the version number to avoid the confusion:
```
Could NOT find Libssh2 (missing: LIBSSH2_INCLUDE_DIR LIBSSH2_LIBRARY)
```
https://github.com/curl/curl/actions/runs/11510022503/job/32041149129?pr=15408#step:31:99

Seen with CMake v3.30.5.

Follow-up to 7bab201abe #15193
Closes #15409
2024-10-25 15:04:35 +02:00
..
Platforms cmake: tidy-ups and rebase fixups 2024-10-12 22:33:29 +02:00
cmake_uninstall.cmake.in cmake: more small tidy-ups and fixes 2024-08-08 13:48:28 +02:00
CMakeConfigurableFile.in copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
curl-config.cmake.in cmake: tidy up 2024-09-22 09:51:15 +02:00
CurlSymbolHiding.cmake cmake: tidy up and shorten symbol hiding initialization 2024-10-24 22:12:58 +02:00
CurlTests.c cmake: apply WIN32_LEAN_AND_MEAN to all feature checks 2024-10-11 17:57:03 +02:00
FindBearSSL.cmake cmake: document -D and env build options 2024-10-24 23:06:40 +02:00
FindBrotli.cmake cmake: document -D and env build options 2024-10-24 23:06:40 +02:00
FindCares.cmake cmake: document -D and env build options 2024-10-24 23:06:40 +02:00
FindGSS.cmake cmake: document -D and env build options 2024-10-24 23:06:40 +02:00
FindLibgsasl.cmake cmake: clear package version after pkg-config detection 2024-10-25 15:04:35 +02:00
FindLibidn2.cmake cmake: clear package version after pkg-config detection 2024-10-25 15:04:35 +02:00
FindLibpsl.cmake cmake: document -D and env build options 2024-10-24 23:06:40 +02:00
FindLibssh2.cmake cmake: document -D and env build options 2024-10-24 23:06:40 +02:00
FindLibssh.cmake cmake: clear package version after pkg-config detection 2024-10-25 15:04:35 +02:00
FindLibuv.cmake cmake: clear package version after pkg-config detection 2024-10-25 15:04:35 +02:00
FindMbedTLS.cmake cmake: clear package version after pkg-config detection 2024-10-25 15:04:35 +02:00
FindMSH3.cmake cmake: document -D and env build options 2024-10-24 23:06:40 +02:00
FindNettle.cmake cmake: clear package version after pkg-config detection 2024-10-25 15:04:35 +02:00
FindNGHTTP2.cmake cmake: document -D and env build options 2024-10-24 23:06:40 +02:00
FindNGHTTP3.cmake cmake: document -D and env build options 2024-10-24 23:06:40 +02:00
FindNGTCP2.cmake cmake: document -D and env build options 2024-10-24 23:06:40 +02:00
FindQuiche.cmake cmake: document -D and env build options 2024-10-24 23:06:40 +02:00
FindRustls.cmake cmake: document -D and env build options 2024-10-24 23:06:40 +02:00
FindWolfSSH.cmake cmake: clear package version after pkg-config detection 2024-10-25 15:04:35 +02:00
FindWolfSSL.cmake cmake: clear package version after pkg-config detection 2024-10-25 15:04:35 +02:00
FindZstd.cmake cmake: document -D and env build options 2024-10-24 23:06:40 +02:00
Macros.cmake cmake: use list(APPEND) on CURL_INCLUDES 2024-10-24 19:16:10 +02:00
OtherTests.cmake cmake: use the BSD variable 2024-10-22 20:20:41 +02:00
PickyWarnings.cmake cmake: tidy up picky warning initialization 2024-10-24 21:20:04 +02:00
Utilities.cmake cmake: more syntax tidy-up 2024-08-07 23:41:27 +02:00