[alsa] Add cmake wrapper#30960
Merged
BillyONeal merged 2 commits intomicrosoft:masterfrom Apr 20, 2023
Merged
Conversation
This adds the imported location for both Debug and Release configurations, and sets the target's INTERFACE_LINK_LIBRARIES and the ALSA_LIBRARIES variable to the same libraries as the pkg-config file.
BillyONeal
approved these changes
Apr 19, 2023
Member
BillyONeal
left a comment
There was a problem hiding this comment.
Does it make sense to submit this upstream at https://gitlab.kitware.com/cmake/cmake/-/issues ?
Contributor
|
The usage has been tested successfully locally. |
Contributor
Author
Since it's technically not an issue only for vcpkg (although typically, Linux distributions favour shared builds over static so would be unaffected), I went ahead an opened an issue upstream about it https://gitlab.kitware.com/cmake/cmake/-/issues/24835. |
Member
|
Thanks for submitting upstream! |
7 tasks
7 tasks
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.
./vcpkg x-add-version --alland committing the result.The FindALSA module provided by Kitware does not search for the transitive usage requirements (namely libm, libdl, pthread, and librt). Depending on the system, it may lead to failures when linking statically (see #30625 (comment)).
This PR checks for each library in the order they typically appear in the pkg-config file and adds them to the
ALSA_LIBRARIESlist andALSA::ALSA'sINTERFACE_LINK_LIBRARIES.Additionally, the wrapper sets the available configurations (debug/release) for the target.
cc @BillyONeal