Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
wants to merge 2 commits into from

Conversation

vszakats
Copy link
Member

@vszakats vszakats commented Oct 25, 2024

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.
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