From 04e262513cd3dd7718a6ee59758243ba19b37c8a Mon Sep 17 00:00:00 2001 From: Michael Maltese Date: Tue, 25 Oct 2016 15:19:54 -0700 Subject: [PATCH] CMake: build PortAudio as static library Due to issues raised in #4255. --- CMakeLists.txt | 2 ++ Source/Core/Core/CMakeLists.txt | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 80e300033a..2396911120 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -559,9 +559,11 @@ if(NOT ANDROID) endif() if(SYSTEM_PORTAUDIO AND NOT APPLE) message("Using shared PortAudio for mic support") + set(PORTAUDIO_LIBRARIES portaudio) else() message("Using static PortAudio from Externals for mic support") add_subdirectory(Externals/portaudio) + set(PORTAUDIO_LIBRARIES portaudio_static) endif() endif() diff --git a/Source/Core/Core/CMakeLists.txt b/Source/Core/Core/CMakeLists.txt index 21862dafdd..2a8d36d49f 100644 --- a/Source/Core/Core/CMakeLists.txt +++ b/Source/Core/Core/CMakeLists.txt @@ -274,7 +274,7 @@ if(HIDAPI_FOUND) endif(HIDAPI_FOUND) if(PORTAUDIO_FOUND) - set(LIBS ${LIBS} portaudio) + set(LIBS ${LIBS} ${PORTAUDIO_LIBRARIES}) endif(PORTAUDIO_FOUND) if(OPROFILE_FOUND)