Merge commit 'cc67e4840f1fd579b58b7532722f4cdd96dec94e' as 'libs/CommService'
This commit is contained in:
74
libs/CommService/CMakeLists.txt
Normal file
74
libs/CommService/CMakeLists.txt
Normal file
@@ -0,0 +1,74 @@
|
||||
cmake_minimum_required (VERSION 3.1 FATAL_ERROR)
|
||||
project (UDPService VERSION 0.1.0 LANGUAGES CXX C)
|
||||
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/Modules)
|
||||
include(defaultOptions)
|
||||
|
||||
# IF(NOT TARGET nlohmann_json::nlohmann_json)
|
||||
# set(JSON_BuildTests OFF CACHE INTERNAL "")
|
||||
# add_subdirectory(libs/json EXCLUDE_FROM_ALL)
|
||||
# ENDIF()
|
||||
|
||||
IF(NOT TARGET loguru)
|
||||
add_subdirectory(libs/loguru EXCLUDE_FROM_ALL)
|
||||
set_property(TARGET loguru PROPERTY POSITION_INDEPENDENT_CODE 1)
|
||||
ENDIF()
|
||||
|
||||
|
||||
|
||||
add_library(CommService STATIC
|
||||
|
||||
include/CommService/Convert.hpp
|
||||
include/CommService/transmittable.hpp
|
||||
|
||||
|
||||
include/CommService/CommService.hpp
|
||||
src/CommService/CommService.cpp
|
||||
|
||||
include/CommService/Message.hpp
|
||||
src/CommService/Message.cpp
|
||||
|
||||
include/CommService/ThreadsafeQueue.hpp
|
||||
|
||||
|
||||
# include/UDPService/BasicMessageQueue.hpp
|
||||
# src/UDPService/BasicMessageQueue.cpp
|
||||
|
||||
include/CommService/PayLoads/Join.hpp
|
||||
src/CommService/PayLoads/Join.cpp
|
||||
include/CommService/PayLoads/Leave.hpp
|
||||
src/CommService/PayLoads/Leave.cpp
|
||||
|
||||
include/CommService/PayLoads/Ping.hpp
|
||||
src/CommService/PayLoads/Ping.cpp
|
||||
include/CommService/PayLoads/Pong.hpp
|
||||
src/CommService/PayLoads/Pong.cpp
|
||||
|
||||
|
||||
|
||||
|
||||
)
|
||||
|
||||
target_link_libraries(CommService
|
||||
PUBLIC
|
||||
# nlohmann_json::nlohmann_json
|
||||
loguru
|
||||
pthread
|
||||
)
|
||||
|
||||
target_include_directories(CommService
|
||||
PUBLIC
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||
$<INSTALL_INTERFACE:include>
|
||||
PRIVATE
|
||||
src
|
||||
)
|
||||
|
||||
|
||||
add_executable(main
|
||||
src/main.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(main
|
||||
CommService
|
||||
loguru
|
||||
)
|
||||
Reference in New Issue
Block a user