FindPortAudio: Link ALSA in static builds on Linux#12291
FindPortAudio: Link ALSA in static builds on Linux#12291daschuer merged 2 commits intomixxxdj:mainfrom
Conversation
|
|
||
| #]=======================================================================] | ||
|
|
||
| include(IsStaticLibrary) |
There was a problem hiding this comment.
Note: I've added this include to be explicit, we previously assumed that it was transitively included through one of the other FindX modules.
| ) | ||
| is_static_library(PortAudio_IS_STATIC PortAudio::PortAudio) | ||
| if(PortAudio_IS_STATIC) | ||
| if(PortAudio_ALSA_H) |
There was a problem hiding this comment.
We should probably check if we need this, a few lines above the file states that this was a workaround to provide compile-time defines for checking whether ALSA exists, so we might not want to rely on PortAudio_ALSA_H.
Is it safe to simply link ALSA whenever we find it?
There was a problem hiding this comment.
Yes, we do not "link" it. We just tell the linker "Here is something that you may want to link". So you solution should be safe in any case.
|
I think the PortAudio_ALSA_H can remain for completeness. |
|
Sounds good |
|
Is this a 2.4 PR? |
|
My gut feeling was to scope support for static linking on Linux to |
|
OK, so let's merge it to main. |
As a follow-up to #12284, this is another step towards making it possible to build Mixxx statically on Linux. In particular, we we missing a link dependency on ALSA, that resulted in these errors (see e.g. this build):
This is likely not the end of the story, there are some other libraries such as
libudevthat we'll have to take care of, but that's for another PR.