Commit bf139ea0 authored by Andreas Schuh's avatar Andreas Schuh

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

parent cb62c003
...@@ -232,6 +232,9 @@ foreach (TYPE IN ITEMS STATIC SHARED) ...@@ -232,6 +232,9 @@ foreach (TYPE IN ITEMS STATIC SHARED)
set (defines "GFLAGS_IS_A_DLL=${GFLAGS_IS_A_DLL};NOTHREADS") set (defines "GFLAGS_IS_A_DLL=${GFLAGS_IS_A_DLL};NOTHREADS")
else () else ()
set (defines "GFLAGS_IS_A_DLL=${GFLAGS_IS_A_DLL}") 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 () endif ()
set_target_properties ( set_target_properties (
gflags${opts}-${type} PROPERTIES COMPILE_DEFINITIONS "${defines}" gflags${opts}-${type} PROPERTIES COMPILE_DEFINITIONS "${defines}"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment