cmake: clear package version after pkg-config detection - #15409
Closed
vszakats wants to merge 2 commits into
Closed
Conversation
`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
pkg-config detection
Though there is no pkg-config support for wolfSSH yet.
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
pkg_check_modules()seems to leave<PACKAGE>_VERSIONdefined with anempty 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 thismessage it includes the bogus empty value as:
(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:
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