Refactor/Create APT/DNF Repository (#1648)

This commit is contained in:
Paulchen-Panther
2023-11-16 21:05:56 +01:00
committed by GitHub
parent c9518db597
commit 91270966f9
165 changed files with 1918 additions and 2924 deletions

View File

@@ -1,37 +1,22 @@
# 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}
)
set(ProtoServer_PROTOS ${CURRENT_SOURCE_DIR}/message.proto )
protobuf_generate_cpp(ProtoServer_PROTO_SRCS ProtoServer_PROTO_HDRS ${ProtoServer_PROTOS} )
### Split protoclient from protoserver as protoserver relates to HyperionDaemon and standalone capture binarys can't link to it
add_library(protoclient
${CURRENT_SOURCE_DIR}/ProtoClientConnection.h
${CURRENT_SOURCE_DIR}/ProtoClientConnection.cpp
${ProtoServer_PROTO_SRCS}
${ProtoServer_PROTO_HDRS}
)
add_library(protoserver
${CURRENT_HEADER_DIR}/ProtoServer.h
${CURRENT_SOURCE_DIR}/ProtoServer.cpp
)
# set and compile proto schema
set(ProtoServer_PROTOS ${CMAKE_SOURCE_DIR}/libsrc/protoserver/message.proto)
protobuf_generate_cpp(ProtoServer_PROTO_SRCS ProtoServer_PROTO_HDRS ${ProtoServer_PROTOS})
# disable warnings for auto generated proto files, we can't change the files ....
if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
set_source_files_properties(${ProtoServer_PROTO_SRCS} ${ProtoServer_PROTO_HDRS} ${ProtoServer_PROTOS} PROPERTIES COMPILE_FLAGS "-w -Wno-return-local-addr")
elseif(MSVC)
set_source_files_properties(${ProtoServer_PROTO_SRCS} ${ProtoServer_PROTO_HDRS} ${ProtoServer_PROTOS} PROPERTIES COMPILE_FLAGS "/W0")
endif()
### Split protoclient from protoserver as protoserver relates to HyperionDaemon and standalone capture binarys can't link to it
add_library(protoclient
${CMAKE_SOURCE_DIR}/libsrc/protoserver/ProtoClientConnection.h
${CMAKE_SOURCE_DIR}/libsrc/protoserver/ProtoClientConnection.cpp
${ProtoServer_PROTO_SRCS}
${ProtoServer_PROTO_HDRS}
)
target_link_libraries(protoclient
hyperion
hyperion-utils
@@ -39,6 +24,16 @@ target_link_libraries(protoclient
Qt${QT_VERSION_MAJOR}::Gui
)
target_include_directories(protoclient PUBLIC
${CMAKE_CURRENT_BINARY_DIR}
${PROTOBUF_INCLUDE_DIRS}
)
add_library(protoserver
${CMAKE_SOURCE_DIR}/include/protoserver/ProtoServer.h
${CMAKE_SOURCE_DIR}/libsrc/protoserver/ProtoServer.cpp
)
target_link_libraries(protoserver
hyperion
hyperion-utils