--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -71,7 +71,7 @@
 option(WITH_THREADING "Include client library threading support?" ON)
 if (WITH_THREADING)
 	add_definitions("-DWITH_THREADING")
-	if(WIN32)
+	if(MSVC)
 		find_package(Pthreads4W REQUIRED)
 	endif()
 endif (WITH_THREADING)
--- a/lib/CMakeLists.txt
+++ b/lib/CMakeLists.txt
@@ -90,7 +90,7 @@
 )
 
 if (WITH_THREADING)
-	if(WIN32)
+	if(MSVC)
 		set (LIBRARIES ${LIBRARIES} PThreads4W::PThreads4W)
 	else()
 		set(THREADS_PREFER_PTHREAD_FLAG ON)
