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()