diff options
author | Andreas Schuh <andreas.schuh.84@gmail.com> | 2014-03-20 03:04:44 +0000 |
---|---|---|
committer | Andreas Schuh <andreas.schuh.84@gmail.com> | 2014-03-20 03:04:44 +0000 |
commit | bf139ea0a8e31b0b54ad35b7f3ffef90ed6c7ee3 (patch) | |
tree | e199245de2f25314a07298b8febcc22dcdc16914 /CMakeLists.txt | |
parent | cb62c003548ce9ee30840113fa03c031556c7345 (diff) | |
download | gflags-bf139ea0a8e31b0b54ad35b7f3ffef90ed6c7ee3.tar.gz gflags-bf139ea0a8e31b0b54ad35b7f3ffef90ed6c7ee3.tar.bz2 gflags-bf139ea0a8e31b0b54ad35b7f3ffef90ed6c7ee3.zip |
Fix build of threaded library on Unix by adding the appropriate link library.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index ff5d476..acc38f8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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}" |