CMake/MinGW: Fix missing -pthread linker option for MinGW build.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10092 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Albrecht Schlosser 2014-02-02 00:49:50 +00:00
parent c92e58fdac
commit 1396a79651
1 changed files with 2 additions and 1 deletions

View File

@ -69,7 +69,7 @@ if(WIN32)
endif(CMAKE_C_COMPILER_ID STREQUAL GNU)
if(MINGW AND EXISTS /mingw)
list(APPEND CMAKE_PREFIX_PATH /mingw)
endif(MINGW AND EXISTS /mingw)
endif(MINGW AND EXISTS /mingw)
endif(WIN32)
#######################################################################
@ -409,6 +409,7 @@ endif(OPTION_USE_THREADS AND CMAKE_HAVE_THREADS_LIBRARY)
if(OPTION_USE_THREADS AND CMAKE_USE_PTHREADS_INIT)
set(HAVE_PTHREAD 1)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pthread")
list(APPEND FLTK_LDLIBS -lpthread)
list(APPEND FLTK_CFLAGS -D_THREAD_SAFE -D_REENTRANT)
set(FLTK_PTHREADS_FOUND TRUE)