Browse Source

Require the pthreads library for POSIX lock support.

Ioannis Koutras 13 years ago
parent
commit
811863d59d
2 changed files with 2 additions and 1 deletions
  1. 1 0
      CMakeLists.txt
  2. 1 1
      examples/CMakeLists.txt

+ 1 - 0
CMakeLists.txt

@@ -45,6 +45,7 @@ set(dmmlib_SRCS
 )
 
 if (HAVE_LOCKS)
+	find_package (Threads)
 	set(dmmlib_SRCS
 		${dmmlib_SRCS}
 		posix_lock.c

+ 1 - 1
examples/CMakeLists.txt

@@ -8,4 +8,4 @@ add_executable(test test.c)
 target_link_libraries(test ${DMMLIB_SHARED_LIBRARY})
 
 add_executable(larson larson.c)
-target_link_libraries(larson ${DMMLIB_SHARED_LIBRARY})
+target_link_libraries(larson ${DMMLIB_SHARED_LIBRARY} ${CMAKE_THREAD_LIBS_INIT})