Fix pkg_config_entry when version number is not specified #374
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.
🦟 Bug fix
Fixes gazebosim/gz-transport#412
Summary
When
gz_find_package
is called without a VERSION argument, the<package>_FIND_VERSION
variable is empty. But in most of ourFind*.cmake
modules, we add a pkg-config entry that assumes the version is there.Example:
The pkg-config entry will then be "protobuf >= ", which is invalid and causes the following entry to be treated as a version number.
The fix here removes the operator if the version is empty.
I believe this is why https://build.osrfoundation.org/job/gz-transport13-debbuilder/372/ is failing with
The test uses pkg-config and checking the output of
pkg-config --libs gz-transport13
isIt doesn't include libgz-math7. The contents of
/usr/lib/x86_64-linux-gnu/pkgconfig/gz-msgs10.pc
fromlibgz-msgs10-dev
is:We recently removed the required version of protobuf from gz-msgs (gazebosim/gz-msgs#346) which explains why we haven't seen this failure in
gz-transport12-debbuilder
before.Checklist
codecheck
passed (See contributing)Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining
Signed-off-by
messages.