summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2014-02-02 00:49:50 +0000
committerAlbrecht Schlosser <albrechts.fltk@online.de>2014-02-02 00:49:50 +0000
commit1396a796519a8a01fa1c48ef3fa3e342724a63cb (patch)
treec136c42e495d0ce7ca732e663a8ae7fdfc3afbc7
parentc92e58fdac6fb374493f9b92fd53267fc9eccf83 (diff)
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
-rw-r--r--CMakeLists.txt3
1 files changed, 2 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6d62075c1..896116f0a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -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)