From 8a5e166982965f1002c13139790b1e9ed79a1f04 Mon Sep 17 00:00:00 2001 From: fwcd Date: Sun, 12 Nov 2023 14:17:10 +0000 Subject: [PATCH 1/2] FindPortAudio: Link ALSA in static builds --- cmake/modules/FindPortAudio.cmake | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cmake/modules/FindPortAudio.cmake b/cmake/modules/FindPortAudio.cmake index 3c0a8b5c8f4..398c2238eef 100644 --- a/cmake/modules/FindPortAudio.cmake +++ b/cmake/modules/FindPortAudio.cmake @@ -89,6 +89,14 @@ if(PortAudio_FOUND) ) is_static_library(PortAudio_IS_STATIC PortAudio::PortAudio) if(PortAudio_IS_STATIC) + if(PortAudio_ALSA_H) + find_package(ALSA) + if(ALSA_FOUND) + set_property(TARGET PortAudio::PortAudio APPEND PROPERTY INTERFACE_LINK_LIBRARIES + ALSA::ALSA + ) + endif() + endif() find_package(JACK) if(JACK_FOUND) set_property(TARGET PortAudio::PortAudio APPEND PROPERTY INTERFACE_LINK_LIBRARIES From 9d54077ba486e7bbf90dc8d15823fba28648cadd Mon Sep 17 00:00:00 2001 From: fwcd Date: Sun, 12 Nov 2023 15:12:46 +0000 Subject: [PATCH 2/2] FindPortAudio: Add explicit include of IsStaticLibrary --- cmake/modules/FindPortAudio.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmake/modules/FindPortAudio.cmake b/cmake/modules/FindPortAudio.cmake index 398c2238eef..aa01d4224d9 100644 --- a/cmake/modules/FindPortAudio.cmake +++ b/cmake/modules/FindPortAudio.cmake @@ -43,6 +43,8 @@ The following cache variables may also be set: #]=======================================================================] +include(IsStaticLibrary) + find_package(PkgConfig QUIET) if(PkgConfig_FOUND) pkg_check_modules(PC_PortAudio QUIET portaudio-2.0)