[alsa] Add cmake wrapper#30960
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
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 ?
|
The usage has been tested successfully locally. |
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. |
|
Thanks for submitting upstream! |
./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