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
|
|
@ -2,12 +2,31 @@
|
|||
|
||||
add_subdirectory(libcockatrice/protocol/pb)
|
||||
|
||||
add_library(libcockatrice_protocol_wrapper STATIC)
|
||||
add_library(libcockatrice_protocol STATIC)
|
||||
|
||||
set(SOURCES
|
||||
libcockatrice/protocol/pending_command.cpp
|
||||
)
|
||||
|
||||
set(HEADERS
|
||||
libcockatrice/protocol/pending_command.h
|
||||
)
|
||||
|
||||
target_sources(libcockatrice_protocol
|
||||
PRIVATE
|
||||
${SOURCES}
|
||||
${HEADERS}
|
||||
)
|
||||
|
||||
add_dependencies(libcockatrice_protocol libcockatrice_protocol_pb)
|
||||
|
||||
# Link the actual generated protobuf library
|
||||
target_link_libraries(libcockatrice_protocol_wrapper PUBLIC libcockatrice_protocol)
|
||||
target_link_libraries(libcockatrice_protocol PUBLIC ${COCKATRICE_QT_MODULES} libcockatrice_protocol_pb)
|
||||
|
||||
# Expose the pb/ folder so consumers can do #include <libcockatrice/protocol/pb/header.pb.h>
|
||||
# Expose include paths
|
||||
target_include_directories(
|
||||
libcockatrice_protocol_wrapper PUBLIC ${CMAKE_CURRENT_BINARY_DIR} # points to the generated headers
|
||||
libcockatrice_protocol
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_BINARY_DIR} # points to the generated headers
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue