initial
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
if(NOT DEFINED CMAKE_CXX_STANDARD)
|
||||
set(CMAKE_CXX_STANDARD 23)
|
||||
endif()
|
||||
|
||||
add_compile_options(-fno-omit-frame-pointer)
|
||||
if(CMAKE_BUILD_TYPE STREQUAL "Debug" OR NOT CMAKE_BUILD_TYPE)
|
||||
add_compile_options(-g)
|
||||
endif()
|
||||
|
||||
option(USE_MOLD_LINKER "Use mold as the linker" ON)
|
||||
if(USE_MOLD_LINKER)
|
||||
add_link_options(-fuse-ld=mold)
|
||||
endif()
|
||||
|
||||
option(TRACY_ENABLE "Enable Tracy profiler" ON)
|
||||
|
||||
add_compile_definitions(
|
||||
IMGUI_IMPL_VULKAN_USE_VOLK
|
||||
SPDLOG_COMPILED_LIB
|
||||
GLM_ENABLE_EXPERIMENTAL
|
||||
TRACY_ENABLE
|
||||
TRACY_CALLSTACK=1
|
||||
)
|
||||
@@ -0,0 +1,74 @@
|
||||
set(EXPECTED_BUILD_TESTS OFF CACHE BOOL "Disable tl::expected tests" FORCE)
|
||||
set(BUILD_EXAMPLES OFF CACHE BOOL "Disable dependency examples" FORCE)
|
||||
set(LFT_ENABLE_EXAMPLES OFF CACHE BOOL "Disable loft examples" FORCE)
|
||||
set(FASTNOISE2_NOISETOOL OFF CACHE BOOL "Disable FastNoise2 graph tool" FORCE)
|
||||
|
||||
find_package(Vulkan REQUIRED)
|
||||
find_package(SDL2 REQUIRED)
|
||||
find_package(Protobuf CONFIG REQUIRED)
|
||||
|
||||
include(FetchContent)
|
||||
set(CMAKE_CONFIGURATION_TYPES "Debug;Release;Distribution")
|
||||
|
||||
FetchContent_Declare(
|
||||
glm
|
||||
GIT_REPOSITORY https://github.com/g-truc/glm
|
||||
GIT_TAG 1.0.1
|
||||
SOURCE_DIR ${CMAKE_SOURCE_DIR}/external/glm/
|
||||
GIT_SHALLOW TRUE
|
||||
)
|
||||
|
||||
FetchContent_Declare(
|
||||
entt
|
||||
GIT_REPOSITORY https://github.com/skypjack/entt
|
||||
GIT_TAG v3.15.0
|
||||
SOURCE_DIR ${CMAKE_SOURCE_DIR}/external/entt
|
||||
GIT_SHALLOW TRUE
|
||||
)
|
||||
|
||||
FetchContent_Declare(
|
||||
Catch2
|
||||
GIT_REPOSITORY https://github.com/catchorg/Catch2.git
|
||||
GIT_TAG v3.10.0
|
||||
FIND_PACKAGE_ARGS
|
||||
)
|
||||
|
||||
FetchContent_Declare(
|
||||
JoltPhysics
|
||||
GIT_REPOSITORY https://github.com/jrouwe/JoltPhysics
|
||||
GIT_TAG v5.4.0
|
||||
SOURCE_DIR ${CMAKE_SOURCE_DIR}/external/jolt/
|
||||
SOURCE_SUBDIR Build
|
||||
)
|
||||
|
||||
FetchContent_Declare(
|
||||
spdlog
|
||||
GIT_REPOSITORY https://github.com/gabime/spdlog
|
||||
GIT_TAG v1.16.0
|
||||
GIT_SHALLOW TRUE
|
||||
)
|
||||
|
||||
FetchContent_Declare(
|
||||
expected
|
||||
GIT_REPOSITORY https://github.com/TartanLlama/expected
|
||||
GIT_SHALLOW TRUE
|
||||
)
|
||||
|
||||
FetchContent_Declare(
|
||||
tracy
|
||||
GIT_REPOSITORY https://github.com/wolfpld/tracy.git
|
||||
GIT_TAG master
|
||||
GIT_SHALLOW TRUE
|
||||
)
|
||||
|
||||
# FetchContent_Declare(
|
||||
# Quadtree
|
||||
# GIT_REPOSITORY https://github.com/pvigier/Quadtree.git
|
||||
# GIT_SHALLOW TRUE
|
||||
# )
|
||||
|
||||
FetchContent_MakeAvailable(glm entt Catch2 JoltPhysics spdlog expected tracy)
|
||||
|
||||
add_subdirectory(${CMAKE_SOURCE_DIR}/external/loft)
|
||||
add_subdirectory(${CMAKE_SOURCE_DIR}/external/imgui)
|
||||
add_subdirectory(${CMAKE_SOURCE_DIR}/external/implot)
|
||||
@@ -0,0 +1,11 @@
|
||||
add_subdirectory(${CMAKE_SOURCE_DIR}/modules/network/)
|
||||
add_subdirectory(${CMAKE_SOURCE_DIR}/modules/protocol/)
|
||||
add_subdirectory(${CMAKE_SOURCE_DIR}/modules/messaging/)
|
||||
add_subdirectory(${CMAKE_SOURCE_DIR}/modules/chat_service/)
|
||||
add_subdirectory(${CMAKE_SOURCE_DIR}/modules/server/)
|
||||
add_subdirectory(${CMAKE_SOURCE_DIR}/modules/client/)
|
||||
add_subdirectory(${CMAKE_SOURCE_DIR}/modules/mock_client/)
|
||||
add_subdirectory(${CMAKE_SOURCE_DIR}/modules/gui/)
|
||||
add_subdirectory(${CMAKE_SOURCE_DIR}/modules/server_gui/)
|
||||
add_subdirectory(${CMAKE_SOURCE_DIR}/modules/serialization/)
|
||||
add_subdirectory(${CMAKE_SOURCE_DIR}/modules/peer_to_peer/)
|
||||
Reference in New Issue
Block a user