vcpkg/ports/mosquitto/0006-pthreads-for-windows.patch

16 lines
527 B
Diff
Raw Normal View History

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4c55e05..adece3e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -68,8 +68,8 @@ option(WITH_THREADING "Include client library threading support?" ON)
if (WITH_THREADING)
add_definitions("-DWITH_THREADING")
if (WIN32)
- find_package(Threads REQUIRED)
- set (PTHREAD_LIBRARIES Threads::Threads)
+ find_package(pthread CONFIG REQUIRED)
+ set (PTHREAD_LIBRARIES PThreads4W::PThreads4W)
set (PTHREAD_INCLUDE_DIR "")
elseif (ANDROID)
set (PTHREAD_LIBRARIES "")