mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-23 15:13:55 -07:00
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:
parent
62f756e698
commit
4fd8c94df0
4 changed files with 10 additions and 27 deletions
|
|
@ -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})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue