Force linking with pthread under unix

Protobuf depends on pthread under unix, but cmake’s FindProtobuf
doesn’t add -lpthread to link flags
This commit is contained in:
Fabio Bas 2014-06-13 19:09:33 +02:00
parent dd768ba7bd
commit a4fbf8b677

View file

@ -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})