From 049446d9bb89fa3d77248fb627075630a60ca43b Mon Sep 17 00:00:00 2001 From: Florent Castelli Date: Sat, 4 Feb 2017 00:56:03 +0100 Subject: [PATCH] cmake: Properly link against pthread on Linux using CMake's detection --- Externals/portaudio/CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Externals/portaudio/CMakeLists.txt b/Externals/portaudio/CMakeLists.txt index b03b6297cd..ee3f119445 100644 --- a/Externals/portaudio/CMakeLists.txt +++ b/Externals/portaudio/CMakeLists.txt @@ -316,8 +316,9 @@ ELSE() ENDIF() - SET(PA_PKGCONFIG_LDFLAGS "${PA_PKGCONFIG_LDFLAGS} -lm -lpthread") - SET(PA_LIBRARY_DEPENDENCIES ${PA_LIBRARY_DEPENDENCIES} m pthread) + find_package(Threads) + SET(PA_PKGCONFIG_LDFLAGS "${PA_PKGCONFIG_LDFLAGS} -lm") + SET(PA_LIBRARY_DEPENDENCIES ${PA_LIBRARY_DEPENDENCIES} m Threads::Threads) ENDIF()