Fix build of threaded library on Unix by adding the appropriate link library.

This commit is contained in:
Andreas Schuh 2014-03-20 03:04:44 +00:00
parent cb62c00354
commit bf139ea0a8

View file

@ -232,6 +232,9 @@ foreach (TYPE IN ITEMS STATIC SHARED)
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}"