mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-16 15:32:15 -07:00
Move pending command, adjust CmakeLists.
Took 24 minutes
This commit is contained in:
parent
c5bf87dfed
commit
eb7c4cae6c
33 changed files with 96 additions and 43 deletions
|
|
@ -171,12 +171,12 @@ if(${Protobuf_VERSION} VERSION_LESS "3.21.0.0")
|
|||
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
||||
protobuf_generate_cpp(PROTO_SRCS PROTO_HDRS ${PROTO_FILES})
|
||||
|
||||
add_library(libcockatrice_protocol ${PROTO_SRCS} ${PROTO_HDRS})
|
||||
set(libcockatrice_protocol_LIBS ${PROTOBUF_LIBRARIES})
|
||||
add_library(libcockatrice_protocol_pb ${PROTO_SRCS} ${PROTO_HDRS})
|
||||
set(libcockatrice_protocol_pb_LIBS ${PROTOBUF_LIBRARIES})
|
||||
if(UNIX)
|
||||
set(libcockatrice_protocol_LIBS ${libcockatrice_protocol_LIBS} -lpthread)
|
||||
set(libcockatrice_protocol_pb_LIBS ${libcockatrice_protocol_pb_LIBS} -lpthread)
|
||||
endif(UNIX)
|
||||
target_link_libraries(libcockatrice_protocol ${libcockatrice_protocol_LIBS})
|
||||
target_link_libraries(libcockatrice_protocol_pb ${libcockatrice_protocol_pb_LIBS})
|
||||
|
||||
# ubuntu uses an outdated package for protobuf, 3.1.0 is required
|
||||
if(${Protobuf_VERSION} VERSION_LESS "3.1.0")
|
||||
|
|
@ -188,10 +188,10 @@ if(${Protobuf_VERSION} VERSION_LESS "3.21.0.0")
|
|||
)
|
||||
endif()
|
||||
else()
|
||||
add_library(libcockatrice_protocol ${PROTO_FILES})
|
||||
target_link_libraries(libcockatrice_protocol PUBLIC protobuf::libprotobuf)
|
||||
add_library(libcockatrice_protocol_pb ${PROTO_FILES})
|
||||
target_link_libraries(libcockatrice_protocol_pb PUBLIC protobuf::libprotobuf)
|
||||
set(PROTO_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}")
|
||||
target_include_directories(libcockatrice_protocol PUBLIC "${PROTOBUF_INCLUDE_DIRS}")
|
||||
target_include_directories(libcockatrice_protocol_pb PUBLIC "${PROTOBUF_INCLUDE_DIRS}")
|
||||
|
||||
protobuf_generate(TARGET libcockatrice_protocol IMPORT_DIRS "." PROTOC_OUT_DIR "${PROTO_BINARY_DIR}")
|
||||
protobuf_generate(TARGET libcockatrice_protocol_pb IMPORT_DIRS "." PROTOC_OUT_DIR "${PROTO_BINARY_DIR}")
|
||||
endif()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue