Skip to content

should I expect a package to include its link dependencies #36934

Answered by Osyotr
willie asked this question in Q&A
Discussion options

You must be logged in to vote

It's upstream responsibility to add required find_dependency calls into their exported configs. Some packages do it properly, some don't. Vcpkg does try to fix such problems (though I don't think it's explicitly mentioned anywhere). opentelementry-cpp already has one patch that adds required find_dependency call, though not for protobuf.
The fix varies from port to port, check out github search for find_dependency to gather some inspiration: link.

protobuf throws a bunch of errors if you use lowercase find_package(protobuf CONFIG REQUIRED), which is another issue, like how do you fix this without breaking existing usage?

What errors? CMake searches for a file called <lowercasePackageNam…

Replies: 7 comments 11 replies

Comment options

You must be logged in to vote
8 replies
@Osyotr
Comment options

@willie
Comment options

@Osyotr
Comment options

@dg0yt
Comment options

@willie
Comment options

Answer selected by willie
Comment options

You must be logged in to vote
1 reply
@willie
Comment options

Comment options

You must be logged in to vote
1 reply
@willie
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@dg0yt
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants