-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
64 lines (53 loc) · 2.78 KB
/
CMakeLists.txt
File metadata and controls
64 lines (53 loc) · 2.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
CMAKE_MINIMUM_REQUIRED(VERSION 3.10)
PROJECT(DiamondDogs)
# and turquoise days...
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /MP /Gy")
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /Oi /MP /Gy")
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /Gy")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /JMC")
FIND_PACKAGE(Vulkan REQUIRED)
# Configure and organize Slang compiler for Vulkan/SPIR-V use
include(cmake/ConfigureSlang.cmake)
add_subdirectory(third_party/slang)
organize_slang_targets()
add_subdirectory(third_party/vma)
add_subdirectory(third_party/entt)
SET(GLI_TEST_ENABLE OFF CACHE BOOL "Build unit tests")
add_subdirectory(third_party/gli)
set_target_properties(gli PROPERTIES FOLDER "third_party")
set_target_properties(gli_dummy PROPERTIES FOLDER "third_party")
SET(MI_BUILD_OBJECT OFF CACHE BOOL "Build object library")
SET(MI_BUILD_SHARED OFF CACHE BOOL "Build shared library")
SET(MI_BUILD_TESTS OFF CACHE BOOL "Build test executables")
SET(MI_WIN_REDIRECT OFF CACHE BOOL "Use redirection module ('mimalloc-redirect') on Windows if compiling mimalloc as a DLL")
SET(MI_WIN_USE_FIXED_TLS ON CACHE BOOL "Use a fixed TLS slot on Windows to avoid extra tests in the malloc fast path")
add_subdirectory(third_party/mimalloc)
set_target_properties(mimalloc-static PROPERTIES FOLDER "third_party")
SET(GLFW_BUILD_DOCS OFF CACHE BOOL "Build the GLFW documentation")
SET(GLFW_BUILD_EXAMPLES OFF CACHE BOOL "Build the GLFW example programs")
SET(GLFW_BUILD_TESTS OFF CACHE BOOL "Build the GLFW test programs")
set(GLFW_LIBRARY_TYPE "STATIC" CACHE STRING "Library type override for GLFW (SHARED, STATIC, OBJECT, or empty to follow BUILD_SHARED_LIBS)")
add_subdirectory(third_party/glfw)
set_target_properties(glfw PROPERTIES FOLDER "third_party")
# Foundation is core functionality that wouldn't make sense to put into modules:
# Threading primitives, utilities, exception helpers, containers, etc
# Also our building block reactor objects, used to build higher-level systems
ADD_SUBDIRECTORY(foundation)
ADD_SUBDIRECTORY(modules)
# Configure Google Test for unit testing
include(FetchContent)
FetchContent_Declare(
googletest
URL https://github.com/google/googletest/archive/52eb8108c5bdec04579160ae17225d66034bd723.zip
)
# For Windows: Prevent overriding the parent project's compiler/linker settings
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
FetchContent_MakeAvailable(googletest)
# Enable testing and add test directories
enable_testing()
set_target_properties(gtest PROPERTIES FOLDER "Tests/Gtest")
set_target_properties(gtest_main PROPERTIES FOLDER "Tests/Gtest")
set_target_properties(gmock PROPERTIES FOLDER "Tests/Gtest")
set_target_properties(gmock_main PROPERTIES FOLDER "Tests/Gtest")
ADD_SUBDIRECTORY(tests/unit_tests)
ADD_SUBDIRECTORY(tests/integration_tests)