From bdb6c3219a9e016f9d3a4f199869952926e75431 Mon Sep 17 00:00:00 2001 From: Nate Rosenblum Date: Sun, 6 Sep 2015 08:09:29 -0700 Subject: [PATCH] Add pthread library to linker list when needed --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index ecb1355..d0780c4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -376,6 +376,10 @@ if (UNWIND_LIBRARY) target_link_libraries (glog PUBLIC ${UNWIND_LIBRARY}) endif (UNWIND_LIBRARY) +if (HAVE_PTHREAD) + target_link_libraries (glog PUBLIC ${CMAKE_THREAD_LIBS_INIT}) +endif (HAVE_PTHREAD) + if (WIN32 AND HAVE_SNPRINTF) set_property (SOURCE src/windows/port.cc APPEND PROPERTY COMPILE_DEFINITIONS HAVE_SNPRINTF) -- 2.7.4