Overhaul common's CMakeLists.txt

* Use automoc instead of a manual list of headers
* Remove Qt4 detection
* Created missing .cpp for .h files (for automoc detection)
* Remove pthread linking
* Forcing -lprotobuf is not needed for mingw; msvc only?
This commit is contained in:
Fabio Bas 2014-06-11 01:24:34 +02:00
parent 62f756e698
commit 4fd8c94df0
4 changed files with 10 additions and 27 deletions

View file

@ -144,14 +144,13 @@ SET(PROTO_FILES
session_event.proto
)
find_package(Protobuf REQUIRED)
include_directories(${PROTOBUF_INCLUDE_DIRS})
include_directories(${CMAKE_CURRENT_BINARY_DIR})
PROTOBUF_GENERATE_CPP(PROTO_SRCS PROTO_HDRS ${PROTO_FILES})
add_library(cockatrice_protocol ${PROTO_SRCS} ${PROTO_HDRS})
set(cockatrice_protocol_LIBS ${PROTOBUF_LIBRARIES})
if (WIN32)
if (MSVC)
set(cockatrice_protocol_LIBS ${cockatrice_protocol_LIBS} -lprotobuf)
endif (WIN32)
endif (MSVC)
target_link_libraries(cockatrice_protocol ${cockatrice_protocol_LIBS})