From 640883a1466a54c02e3b537b3b1fbd1a0303e34a Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Sat, 23 Jan 2016 21:53:29 +0100 Subject: [PATCH] do not even test pthread on windows This way, the Java library won't have any dependency on the winpthread-1.dll library provided by mingw32-64. Less dependencies, less problems. --- CMakeLists.txt | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b6dc451fc7..5e19c961af 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -281,12 +281,14 @@ endif() # Checks for header libraries functions. CHECK_LIBRARY_EXISTS(dl dlopen "" HAVE_DLOPEN_IN_LIBDL) CHECK_LIBRARY_EXISTS(execinfo backtrace "" HAVE_BACKTRACE_IN_LIBEXECINFO) -CHECK_LIBRARY_EXISTS(pthread pthread_create "" HAVE_PTHREAD) -CHECK_LIBRARY_EXISTS(pthread sem_init "" HAVE_SEM_INIT_LIB) -CHECK_LIBRARY_EXISTS(pthread sem_open "" HAVE_SEM_OPEN_LIB) -CHECK_LIBRARY_EXISTS(pthread sem_timedwait "" HAVE_SEM_TIMEDWAIT_LIB) -CHECK_LIBRARY_EXISTS(pthread pthread_mutex_timedlock "" HAVE_MUTEX_TIMEDLOCK_LIB) CHECK_LIBRARY_EXISTS(rt clock_gettime "" HAVE_POSIX_GETTIME) +if(NOT WIN32) + CHECK_LIBRARY_EXISTS(pthread pthread_create "" HAVE_PTHREAD) + CHECK_LIBRARY_EXISTS(pthread sem_init "" HAVE_SEM_INIT_LIB) + CHECK_LIBRARY_EXISTS(pthread sem_open "" HAVE_SEM_OPEN_LIB) + CHECK_LIBRARY_EXISTS(pthread sem_timedwait "" HAVE_SEM_TIMEDWAIT_LIB) + CHECK_LIBRARY_EXISTS(pthread pthread_mutex_timedlock "" HAVE_MUTEX_TIMEDLOCK_LIB) +endif() if(CMAKE_SYSTEM_NAME MATCHES "Darwin") set(CMAKE_REQUIRED_DEFINITIONS "-D_XOPEN_SOURCE=700 -D_DARWIN_C_SOURCE") -- 2.20.1