summaryrefslogtreecommitdiff
blob: 46ae6e1588b8a3ad0fa56035e575d972f89a2170 (plain)
1
2
3
4
5
6
7
8
9
10
11
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -141,6 +141,8 @@
     check_library_exists ("pthread" pthread_create "" HAVE_PTHREAD)
     if (HAVE_PTHREAD)
         list (APPEND libs pthread)
+        set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pthread")
+        set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
     else()
         message (FATAL_ERROR "Missing library: pthread")
     endif()