2016-05-26 23:44:27 +02:00
|
|
|
|
|
|
|
# Define the current source locations
|
|
|
|
set(CURRENT_HEADER_DIR ${CMAKE_SOURCE_DIR}/include/protoserver)
|
|
|
|
set(CURRENT_SOURCE_DIR ${CMAKE_SOURCE_DIR}/libsrc/protoserver)
|
|
|
|
|
|
|
|
include_directories(
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}
|
|
|
|
${PROTOBUF_INCLUDE_DIRS}
|
|
|
|
)
|
2017-08-04 23:08:15 +02:00
|
|
|
FILE ( GLOB ProtoServer_SOURCES "${CURRENT_HEADER_DIR}/*.h" "${CURRENT_SOURCE_DIR}/*.h" "${CURRENT_SOURCE_DIR}/*.cpp" )
|
2016-05-26 23:44:27 +02:00
|
|
|
|
2017-08-04 23:08:15 +02:00
|
|
|
set(ProtoServer_PROTOS ${CURRENT_SOURCE_DIR}/message.proto )
|
2016-05-26 23:44:27 +02:00
|
|
|
|
2017-08-04 23:08:15 +02:00
|
|
|
protobuf_generate_cpp(ProtoServer_PROTO_SRCS ProtoServer_PROTO_HDRS ${ProtoServer_PROTOS} )
|
2016-05-26 23:44:27 +02:00
|
|
|
|
|
|
|
add_library(protoserver
|
|
|
|
${ProtoServer_SOURCES}
|
|
|
|
${ProtoServer_PROTOS}
|
|
|
|
${ProtoServer_PROTO_SRCS}
|
|
|
|
${ProtoServer_PROTO_HDRS}
|
|
|
|
)
|
2017-08-12 07:55:32 +02:00
|
|
|
# disable warnings for auto generatet proto files, we can't change the files ....
|
|
|
|
SET_SOURCE_FILES_PROPERTIES ( ${ProtoServer_PROTO_SRCS} ${ProtoServer_PROTO_HDRS} ${ProtoServer_PROTOS} PROPERTIES COMPILE_FLAGS -w )
|
2016-06-17 01:25:40 +02:00
|
|
|
|
2016-05-26 23:44:27 +02:00
|
|
|
target_link_libraries(protoserver
|
|
|
|
hyperion
|
|
|
|
hyperion-utils
|
|
|
|
protobuf
|
2017-08-01 15:42:36 +02:00
|
|
|
Qt5::Gui
|
2016-05-26 23:44:27 +02:00
|
|
|
)
|