blob: bb1a23a6cccc7e1cb285b9993cb9d3189f2d7978 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -136,7 +140,8 @@
# pthread is used on both Linux and Mac
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 (HAVE_PTHREAD)
message(FATAL_ERROR "Missing library: pthread")
endif()
|