-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
193 lines (142 loc) · 10.6 KB
/
CMakeLists.txt
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
cmake_minimum_required(VERSION 3.20)
project(Verlet)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
# Set output directories for binaries
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_MINSIZEREL ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
# Set output directories for archives
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lib)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY})
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELWITHDEBINFO ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY})
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_MINSIZEREL ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY})
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY})
# Set output directories for libraries
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE ${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELWITHDEBINFO ${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_MINSIZEREL ${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG ${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
# Set path to external modules sources
set(YAE_EXTERNAL_MODULES_DIR ${CMAKE_CURRENT_SOURCE_DIR}/cloned_repositories)
set(YAE_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/deps/yae")
set(YAE_PROJECT_ROOT "${CMAKE_CURRENT_SOURCE_DIR}")
set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH};${YAE_ROOT}/cmake")
include(yae_lto)
enable_lto_globally()
# https://github.com/google/googletest v1.15.2
set(YAE_gtest_SOURCES ${YAE_EXTERNAL_MODULES_DIR}/google/googletest/1_15_2)
option(INSTALL_GTEST "" OFF)
option(BUILD_GMOCK "" OFF)
add_subdirectory(${YAE_gtest_SOURCES} yae_modules/google/googletest/1_15_2 SYSTEM)
# https://github.com/Sunday111/EverydayTools master
set(YAE_edt_SOURCES ${YAE_EXTERNAL_MODULES_DIR}/Sunday111/EverydayTools)
option(EDT_WITH_TESTS "" ON)
option(EDT_FETCH_GOOGLE_TESTS "" OFF)
option(EDT_FIND_GTEST_PACKAGE "" OFF)
add_subdirectory(${YAE_edt_SOURCES} yae_modules/Sunday111/EverydayTools SYSTEM)
# https://github.com/Sunday111/CppReflection for_yae
set(YAE_CppReflection_SOURCES ${YAE_EXTERNAL_MODULES_DIR}/Sunday111/CppReflection)
add_subdirectory(${YAE_CppReflection_SOURCES} yae_modules/Sunday111/CppReflection SYSTEM)
# https://github.com/martinus/unordered_dense v4.1.2
set(YAE_unordered_dense_SOURCES ${YAE_EXTERNAL_MODULES_DIR}/martinus/unordered_dense)
add_subdirectory(${YAE_unordered_dense_SOURCES} yae_modules/martinus/unordered_dense SYSTEM)
# https://github.com/fmtlib/fmt 11.1.1
set(YAE_fmtlib_SOURCES ${YAE_EXTERNAL_MODULES_DIR}/fmt/11_1_1)
add_subdirectory(${YAE_fmtlib_SOURCES} yae_modules/fmt/11_1_1 SYSTEM)
set(YAE_ecs_SOURCES deps/yae/modules/examples/ecs)
add_subdirectory(${YAE_ecs_SOURCES} yae_modules/deps/yae/modules/examples/ecs SYSTEM)
# https://github.com/google/benchmark v1.8.3
set(YAE_gbench_main_SOURCES ${YAE_EXTERNAL_MODULES_DIR}/google/benchmark/1_8_3)
option(BENCHMARK_ENABLE_TESTING "" OFF)
add_subdirectory(${YAE_gbench_main_SOURCES} yae_modules/google/benchmark/1_8_3 SYSTEM)
set(YAE_ecs_benchmark_SOURCES deps/yae/modules/examples/ecs_benchmark)
add_subdirectory(${YAE_ecs_benchmark_SOURCES} yae_modules/deps/yae/modules/examples/ecs_benchmark SYSTEM)
set(YAE_ecs_tests_SOURCES deps/yae/modules/examples/ecs_tests)
add_subdirectory(${YAE_ecs_tests_SOURCES} yae_modules/deps/yae/modules/examples/ecs_tests SYSTEM)
set(YAE_yae_example_benchmark_SOURCES deps/yae/modules/examples/yae_example_benchmark)
add_subdirectory(${YAE_yae_example_benchmark_SOURCES} yae_modules/deps/yae/modules/examples/yae_example_benchmark SYSTEM)
set(YAE_yae_example_benchmark_main_SOURCES deps/yae/modules/examples/yae_example_benchmark_main)
add_subdirectory(${YAE_yae_example_benchmark_main_SOURCES} yae_modules/deps/yae/modules/examples/yae_example_benchmark_main SYSTEM)
set(YAE_yae_example_library_SOURCES deps/yae/modules/examples/yae_example_library)
add_subdirectory(${YAE_yae_example_library_SOURCES} yae_modules/deps/yae/modules/examples/yae_example_library SYSTEM)
set(YAE_yae_example_header_only_SOURCES deps/yae/modules/examples/yae_example_header_only)
add_subdirectory(${YAE_yae_example_header_only_SOURCES} yae_modules/deps/yae/modules/examples/yae_example_header_only SYSTEM)
set(YAE_yae_example_executable_SOURCES deps/yae/modules/examples/yae_example_executable)
add_subdirectory(${YAE_yae_example_executable_SOURCES} yae_modules/deps/yae/modules/examples/yae_example_executable SYSTEM)
set(YAE_yae_example_tests_SOURCES deps/yae/modules/examples/yae_example_tests)
add_subdirectory(${YAE_yae_example_tests_SOURCES} yae_modules/deps/yae/modules/examples/yae_example_tests SYSTEM)
set(YAE_yae_example_tests_main_SOURCES deps/yae/modules/examples/yae_example_tests_main)
add_subdirectory(${YAE_yae_example_tests_main_SOURCES} yae_modules/deps/yae/modules/examples/yae_example_tests_main SYSTEM)
# https://github.com/Sunday111/ass main
set(YAE_ass_SOURCES ${YAE_EXTERNAL_MODULES_DIR}/Sunday111/ass)
option(ASS_ENABLE_TESTING "" ON)
option(ASS_FETCH_GOOGLE_TESTS "" OFF)
add_subdirectory(${YAE_ass_SOURCES} yae_modules/Sunday111/ass SYSTEM)
# https://github.com/nlohmann/json develop
set(YAE_nlohmann_json_SOURCES ${YAE_EXTERNAL_MODULES_DIR}/nlohmann/json)
add_subdirectory(${YAE_nlohmann_json_SOURCES} yae_modules/nlohmann/json SYSTEM)
# https://github.com/Sunday111/glad main
set(YAE_glad_SOURCES ${YAE_EXTERNAL_MODULES_DIR}/Sunday111/glad)
add_subdirectory(${YAE_glad_SOURCES} yae_modules/Sunday111/glad SYSTEM)
# https://github.com/glfw/glfw master
set(YAE_glfw_SOURCES ${YAE_EXTERNAL_MODULES_DIR}/glfw/glfw)
option(GLFW_BUILD_EXAMPLES "" OFF)
option(GLFW_BUILD_TESTS "" OFF)
option(GLFW_BUILD_DOCS "" OFF)
add_subdirectory(${YAE_glfw_SOURCES} yae_modules/glfw/glfw SYSTEM)
# https://github.com/ocornut/imgui v1.90.9
set(YAE_imgui_sources_SOURCES ${YAE_EXTERNAL_MODULES_DIR}/ocornut/imgui)
set(YAE_imgui_glfw_cmake_SOURCES cloned_repositories/Sunday111/imgui_glfw_cmake)
add_subdirectory(${YAE_imgui_glfw_cmake_SOURCES} yae_modules/cloned_repositories/Sunday111/imgui_glfw_cmake SYSTEM)
# https://github.com/jeremy-rifkin/cpptrace main
set(YAE_cpptrace_SOURCES ${YAE_EXTERNAL_MODULES_DIR}/jeremy-rifkin/cpptrace)
add_subdirectory(${YAE_cpptrace_SOURCES} yae_modules/jeremy-rifkin/cpptrace SYSTEM)
# https://github.com/Neargye/magic_enum v0.9.7
set(YAE_magic_enum_SOURCES ${YAE_EXTERNAL_MODULES_DIR}/Neargye/magic_enum)
add_subdirectory(${YAE_magic_enum_SOURCES} yae_modules/Neargye/magic_enum SYSTEM)
# https://github.com/TartanLlama/expected v1.1.0
set(YAE_expected_SOURCES ${YAE_EXTERNAL_MODULES_DIR}/TartanLlama/expected)
option(EXPECTED_BUILD_TESTS "" OFF)
add_subdirectory(${YAE_expected_SOURCES} yae_modules/TartanLlama/expected SYSTEM)
set(YAE_klgl_SOURCES cloned_repositories/Sunday111/klgl/klgl)
add_subdirectory(${YAE_klgl_SOURCES} yae_modules/cloned_repositories/Sunday111/klgl/klgl SYSTEM)
set(YAE_verlet_lib_SOURCES src/verlet_lib)
add_subdirectory(${YAE_verlet_lib_SOURCES} yae_modules/src/verlet_lib SYSTEM)
set(YAE_verlet_SOURCES src/verlet)
add_subdirectory(${YAE_verlet_SOURCES} yae_modules/src/verlet SYSTEM)
set(YAE_verlet_video_SOURCES src/verlet_video)
add_subdirectory(${YAE_verlet_video_SOURCES} yae_modules/src/verlet_video SYSTEM)
set(YAE_klgl_compute_shader_example_SOURCES cloned_repositories/Sunday111/klgl/examples/compute_shader)
add_subdirectory(${YAE_klgl_compute_shader_example_SOURCES} yae_modules/cloned_repositories/Sunday111/klgl/examples/compute_shader SYSTEM)
set(YAE_klgl_geometry_shader_SOURCES cloned_repositories/Sunday111/klgl/examples/geometry_shader)
add_subdirectory(${YAE_klgl_geometry_shader_SOURCES} yae_modules/cloned_repositories/Sunday111/klgl/examples/geometry_shader SYSTEM)
set(YAE_klgl_matmul_sse_benchmark_SOURCES cloned_repositories/Sunday111/klgl/benchmarks/mat_mul_sse)
add_subdirectory(${YAE_klgl_matmul_sse_benchmark_SOURCES} yae_modules/cloned_repositories/Sunday111/klgl/benchmarks/mat_mul_sse SYSTEM)
set(YAE_klgl_minimal_cube_example_SOURCES cloned_repositories/Sunday111/klgl/examples/minimal_cube)
add_subdirectory(${YAE_klgl_minimal_cube_example_SOURCES} yae_modules/cloned_repositories/Sunday111/klgl/examples/minimal_cube SYSTEM)
set(YAE_klgl_minimal_quad_example_SOURCES cloned_repositories/Sunday111/klgl/examples/minimal_quad)
add_subdirectory(${YAE_klgl_minimal_quad_example_SOURCES} yae_modules/cloned_repositories/Sunday111/klgl/examples/minimal_quad SYSTEM)
set(YAE_klgl_painter2d_example_SOURCES cloned_repositories/Sunday111/klgl/examples/painter2d)
add_subdirectory(${YAE_klgl_painter2d_example_SOURCES} yae_modules/cloned_repositories/Sunday111/klgl/examples/painter2d SYSTEM)
set(YAE_klgl_post_processing_example_SOURCES cloned_repositories/Sunday111/klgl/examples/post_processing)
add_subdirectory(${YAE_klgl_post_processing_example_SOURCES} yae_modules/cloned_repositories/Sunday111/klgl/examples/post_processing SYSTEM)
set(YAE_klgl_render_to_texture_example_SOURCES cloned_repositories/Sunday111/klgl/examples/render_to_texture)
add_subdirectory(${YAE_klgl_render_to_texture_example_SOURCES} yae_modules/cloned_repositories/Sunday111/klgl/examples/render_to_texture SYSTEM)
set(YAE_klgl_rotator_benchmark_SOURCES cloned_repositories/Sunday111/klgl/benchmarks/rotators)
add_subdirectory(${YAE_klgl_rotator_benchmark_SOURCES} yae_modules/cloned_repositories/Sunday111/klgl/benchmarks/rotators SYSTEM)
set(YAE_klgl_simple_lit_cube_example_SOURCES cloned_repositories/Sunday111/klgl/examples/simple_lit_cube)
add_subdirectory(${YAE_klgl_simple_lit_cube_example_SOURCES} yae_modules/cloned_repositories/Sunday111/klgl/examples/simple_lit_cube SYSTEM)
set(YAE_klgl_tests_SOURCES cloned_repositories/Sunday111/klgl/tests)
add_subdirectory(${YAE_klgl_tests_SOURCES} yae_modules/cloned_repositories/Sunday111/klgl/tests SYSTEM)
set(YAE_klgl_tetris_example_SOURCES cloned_repositories/Sunday111/klgl/examples/tetris)
add_subdirectory(${YAE_klgl_tetris_example_SOURCES} yae_modules/cloned_repositories/Sunday111/klgl/examples/tetris SYSTEM)
set(YAE_klgl_textured_quad_example_SOURCES cloned_repositories/Sunday111/klgl/examples/textured_quad)
add_subdirectory(${YAE_klgl_textured_quad_example_SOURCES} yae_modules/cloned_repositories/Sunday111/klgl/examples/textured_quad SYSTEM)
set(YAE_klgl_two_textures_example_SOURCES cloned_repositories/Sunday111/klgl/examples/two_textures)
add_subdirectory(${YAE_klgl_two_textures_example_SOURCES} yae_modules/cloned_repositories/Sunday111/klgl/examples/two_textures SYSTEM)
enable_testing()