Fix build of threaded library on Unix by adding the appropriate link library.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ff5d476..acc38f8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -232,6 +232,9 @@
set (defines "GFLAGS_IS_A_DLL=${GFLAGS_IS_A_DLL};NOTHREADS")
else ()
set (defines "GFLAGS_IS_A_DLL=${GFLAGS_IS_A_DLL}")
+ if (CMAKE_USE_PTHREADS_INIT)
+ target_link_libraries (gflags${opts}-${type} ${CMAKE_THREAD_LIBS_INIT})
+ endif ()
endif ()
set_target_properties (
gflags${opts}-${type} PROPERTIES COMPILE_DEFINITIONS "${defines}"