diff --git a/CMakeLists.txt b/CMakeLists.txt index a6924ee52..1bc525d27 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -401,8 +401,8 @@ elseif(NEED_LIBXML2) endif() option(NO_THREADS "Disable multi-threading support" OFF) -if (NEED_THREADS AND NOT NO_THREADS) - if (NOT WIN32) +if (NEED_THREADS) + if (NOT NO_THREADS AND NOT WIN32) find_library(PTHREAD_LIBRARIES pthread) if (NOT PTHREAD_LIBRARIES)