Commit a4fbf8b6 authored by Fabio Bas's avatar Fabio Bas
Browse files

Force linking with pthread under unix

Protobuf depends on pthread under unix, but cmake’s FindProtobuf
doesn’t add -lpthread to link flags
parent dd768ba7
...@@ -157,4 +157,7 @@ set(cockatrice_protocol_LIBS ${PROTOBUF_LIBRARIES}) ...@@ -157,4 +157,7 @@ set(cockatrice_protocol_LIBS ${PROTOBUF_LIBRARIES})
if (MSVC) if (MSVC)
set(cockatrice_protocol_LIBS ${cockatrice_protocol_LIBS} -lprotobuf) set(cockatrice_protocol_LIBS ${cockatrice_protocol_LIBS} -lprotobuf)
endif (MSVC) endif (MSVC)
if (UNIX)
set(cockatrice_protocol_LIBS ${cockatrice_protocol_LIBS} -lpthread)
endif (UNIX)
target_link_libraries(cockatrice_protocol ${cockatrice_protocol_LIBS}) target_link_libraries(cockatrice_protocol ${cockatrice_protocol_LIBS})
Supports Markdown
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