75 lines
1.5 KiB
CMake
75 lines
1.5 KiB
CMake
cmake_minimum_required (VERSION 3.1 FATAL_ERROR)
|
|
project (EntitiyManager VERSION 0.1.0 LANGUAGES CXX C)
|
|
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/Modules)
|
|
include(defaultOptions)
|
|
|
|
#find_package(Eigen3 REQUIRED NO_MODULE)
|
|
|
|
IF (NOT TARGET CLI11)
|
|
set(CLI11_TESTING OFF CACHE BOOL "disable testing")
|
|
add_subdirectory(libs/CLI11 EXCLUDE_FROM_ALL)
|
|
ENDIF()
|
|
|
|
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()
|
|
|
|
|
|
IF (NOT TARGET UDPService)
|
|
set(UDPService_Testing OFF CACHE BOOL "disable testing")
|
|
add_subdirectory(libs/UDPService EXCLUDE_FROM_ALL)
|
|
ENDIF()
|
|
|
|
|
|
|
|
|
|
|
|
add_library(EntityManager STATIC
|
|
|
|
include/EntityManager/EntityManager.hpp
|
|
src/EntityManager/EntityManager.cpp
|
|
|
|
)
|
|
|
|
|
|
target_link_libraries(EntityManager
|
|
PUBLIC
|
|
UDPService
|
|
pthread
|
|
nlohmann_json::nlohmann_json
|
|
loguru
|
|
)
|
|
|
|
target_include_directories(EntityManager
|
|
PUBLIC
|
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
|
$<INSTALL_INTERFACE:include>
|
|
PRIVATE
|
|
src
|
|
)
|
|
|
|
|
|
add_executable(EntitiyManagerApplication
|
|
src/main.cpp
|
|
)
|
|
|
|
target_link_libraries(EntitiyManagerApplication
|
|
CLI11
|
|
EntityManager
|
|
)
|
|
|
|
# target_include_directories(EntitiyManagerApplication
|
|
# PRIVATE
|
|
# src)
|
|
|
|
#
|
|
# Everything TEST related
|
|
#
|
|
|