From a4fbf8b67737b46b10c2fe0e30d12bbb0c3bb8fc Mon Sep 17 00:00:00 2001 From: Fabio Bas Date: Fri, 13 Jun 2014 19:09:33 +0200 Subject: [PATCH] Force linking with pthread under unix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Protobuf depends on pthread under unix, but cmake’s FindProtobuf doesn’t add -lpthread to link flags --- common/pb/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/pb/CMakeLists.txt b/common/pb/CMakeLists.txt index 2930326d..7b005157 100644 --- a/common/pb/CMakeLists.txt +++ b/common/pb/CMakeLists.txt @@ -157,4 +157,7 @@ set(cockatrice_protocol_LIBS ${PROTOBUF_LIBRARIES}) if (MSVC) set(cockatrice_protocol_LIBS ${cockatrice_protocol_LIBS} -lprotobuf) endif (MSVC) +if (UNIX) + set(cockatrice_protocol_LIBS ${cockatrice_protocol_LIBS} -lpthread) +endif (UNIX) target_link_libraries(cockatrice_protocol ${cockatrice_protocol_LIBS})