Skip to content

cmake: clear package version after pkg-config detection - #15409

Closed
vszakats wants to merge 2 commits into
curl:masterfrom
vszakats:cm-find-clear-version
Closed

cmake: clear package version after pkg-config detection#15409
vszakats wants to merge 2 commits into
curl:masterfrom
vszakats:cm-find-clear-version

Conversation

@vszakats

@vszakats vszakats commented Oct 25, 2024

Copy link
Copy Markdown
Member

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 7bab201 #15193

`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 7bab201 curl#15193
@github-actions github-actions Bot added the build label Oct 25, 2024
@vszakats vszakats changed the title cmake: clear version after pkg-config detection cmake: clear package version after pkg-config detection Oct 25, 2024
Though there is no pkg-config support for wolfSSH yet.
@vszakats vszakats closed this in aafc074 Oct 25, 2024
@vszakats
vszakats deleted the cm-find-clear-version branch October 25, 2024 13:05
pps83 pushed a commit to pps83/curl that referenced this pull request Apr 26, 2025
`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 7bab201 curl#15193
Closes curl#15409
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

1 participant