From 3e72f6effd8ea997ecef98385329bd5b0db45b0e Mon Sep 17 00:00:00 2001 From: Paul Bakker Date: Mon, 30 Dec 2013 15:25:08 +0100 Subject: [PATCH] Only search for Pthread on Windows platforms --- programs/ssl/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/programs/ssl/CMakeLists.txt b/programs/ssl/CMakeLists.txt index 1d94ed450..e0cfba050 100644 --- a/programs/ssl/CMakeLists.txt +++ b/programs/ssl/CMakeLists.txt @@ -1,3 +1,4 @@ +set(THREADS_USE_PTHREADS_WIN32 true) find_package(Threads) set(libs @@ -40,7 +41,7 @@ target_link_libraries(ssl_mail_client ${libs}) if(THREADS_FOUND) add_executable(ssl_pthread_server ssl_pthread_server.c) - target_link_libraries(ssl_pthread_server ${libs} pthread) + target_link_libraries(ssl_pthread_server ${libs} ${CMAKE_THREAD_LIBS_INIT}) set(targets ${targets} ssl_pthread_server) endif(THREADS_FOUND)