-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
335 lines (304 loc) · 18.8 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
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
cmake_minimum_required(VERSION 3.17)
project(the-forge-template)
enable_language(ASM)
add_library(gainput
"The-Forge/Common_3/Application/ThirdParty/OpenSource/gainput/lib/source/gainput/gainput.cpp"
"The-Forge/Common_3/Application/ThirdParty/OpenSource/gainput/lib/source/gainput/GainputAllocator.cpp"
"The-Forge/Common_3/Application/ThirdParty/OpenSource/gainput/lib/source/gainput/GainputInputDeltaState.cpp"
"The-Forge/Common_3/Application/ThirdParty/OpenSource/gainput/lib/source/gainput/GainputInputDevice.cpp"
"The-Forge/Common_3/Application/ThirdParty/OpenSource/gainput/lib/source/gainput/GainputInputManager.cpp"
"The-Forge/Common_3/Application/ThirdParty/OpenSource/gainput/lib/source/gainput/GainputInputMap.cpp"
"The-Forge/Common_3/Application/ThirdParty/OpenSource/gainput/lib/source/gainput/GainputInputState.cpp"
"The-Forge/Common_3/Application/ThirdParty/OpenSource/gainput/lib/source/gainput/GainputMapFilters.cpp"
"The-Forge/Common_3/Application/ThirdParty/OpenSource/gainput/lib/source/gainput/hid/GainputHID.cpp"
"The-Forge/Common_3/Application/ThirdParty/OpenSource/gainput/lib/source/gainput/hid/GainputHIDWhitelist.cpp"
"The-Forge/Common_3/Application/ThirdParty/OpenSource/gainput/lib/source/gainput/hid/hidparsers/HIDParserPS4Controller.cpp"
"The-Forge/Common_3/Application/ThirdParty/OpenSource/gainput/lib/source/gainput/hid/hidparsers/HIDParserPS4Controller.cpp"
"The-Forge/Common_3/Application/ThirdParty/OpenSource/gainput/lib/source/gainput/hid/hidparsers/HIDParserPS4Controller.h"
"The-Forge/Common_3/Application/ThirdParty/OpenSource/gainput/lib/source/gainput/hid/hidparsers/HIDParserPS5Controller.cpp"
"The-Forge/Common_3/Application/ThirdParty/OpenSource/gainput/lib/source/gainput/hid/hidparsers/HIDParserPS5Controller.cpp"
"The-Forge/Common_3/Application/ThirdParty/OpenSource/gainput/lib/source/gainput/hid/hidparsers/HIDParserPS5Controller.h"
"The-Forge/Common_3/Application/ThirdParty/OpenSource/gainput/lib/source/gainput/hid/hidparsers/HIDParserSwitchController.cpp"
"The-Forge/Common_3/Application/ThirdParty/OpenSource/gainput/lib/source/gainput/hid/hidparsers/HIDParserSwitchController.h"
"The-Forge/Common_3/Application/ThirdParty/OpenSource/gainput/lib/source/gainput/keyboard/GainputInputDeviceKeyboard.cpp"
"The-Forge/Common_3/Application/ThirdParty/OpenSource/gainput/lib/source/gainput/mouse/GainputInputDeviceMouse.cpp"
"The-Forge/Common_3/Application/ThirdParty/OpenSource/gainput/lib/source/gainput/pad/GainputInputDevicePad.cpp"
"The-Forge/Common_3/Application/ThirdParty/OpenSource/gainput/lib/source/gainput/touch/GainputInputDeviceTouch.cpp"
$<$<PLATFORM_ID:Windows>:
"The-Forge/Common_3/Application/ThirdParty/OpenSource/gainput/lib/source/hidapi/windows/hid.c"
>
$<$<PLATFORM_ID:Linux>:
"The-Forge/Common_3/Application/ThirdParty/OpenSource/gainput/lib/source/hidapi/linux/hid.c"
>
)
if (MSVC)
target_compile_definitions (gainput PRIVATE -D_CRT_SECURE_NO_WARNINGS)
endif ()
target_include_directories(gainput PUBLIC
"The-Forge/Common_3/Application/ThirdParty/OpenSource/gainput/lib/source"
)
add_library(the-forge
"The-Forge/Common_3/Application/CameraController.cpp"
"The-Forge/Common_3/Application/Fonts/FontSystem.cpp"
"The-Forge/Common_3/Application/Fonts/stbtt.cpp"
"The-Forge/Common_3/Application/InputSystem.cpp"
"The-Forge/Common_3/Application/Profiler/GpuProfiler.cpp"
"The-Forge/Common_3/Application/Profiler/ProfilerBase.cpp"
"The-Forge/Common_3/Application/RemoteControl.cpp"
"The-Forge/Common_3/Application/Screenshot.cpp"
"The-Forge/Common_3/Application/ThirdParty/OpenSource/imgui/imgui_demo.cpp"
"The-Forge/Common_3/Application/ThirdParty/OpenSource/imgui/imgui_draw.cpp"
"The-Forge/Common_3/Application/ThirdParty/OpenSource/imgui/imgui_tables.cpp"
"The-Forge/Common_3/Application/ThirdParty/OpenSource/imgui/imgui_widgets.cpp"
"The-Forge/Common_3/Application/ThirdParty/OpenSource/imgui/imgui.cpp"
"The-Forge/Common_3/Application/UI/UI.cpp"
"The-Forge/Common_3/Game/Scripting/LuaManager.cpp"
"The-Forge/Common_3/Game/Scripting/LuaManagerImpl.cpp"
"The-Forge/Common_3/Game/Scripting/LuaSystem.cpp"
"The-Forge/Common_3/Game/ThirdParty/OpenSource/lua-5.3.5/src/lapi.c"
"The-Forge/Common_3/Game/ThirdParty/OpenSource/lua-5.3.5/src/lauxlib.c"
"The-Forge/Common_3/Game/ThirdParty/OpenSource/lua-5.3.5/src/lbaselib.c"
"The-Forge/Common_3/Game/ThirdParty/OpenSource/lua-5.3.5/src/lbitlib.c"
"The-Forge/Common_3/Game/ThirdParty/OpenSource/lua-5.3.5/src/lcode.c"
"The-Forge/Common_3/Game/ThirdParty/OpenSource/lua-5.3.5/src/lcorolib.c"
"The-Forge/Common_3/Game/ThirdParty/OpenSource/lua-5.3.5/src/lctype.c"
"The-Forge/Common_3/Game/ThirdParty/OpenSource/lua-5.3.5/src/ldblib.c"
"The-Forge/Common_3/Game/ThirdParty/OpenSource/lua-5.3.5/src/ldebug.c"
"The-Forge/Common_3/Game/ThirdParty/OpenSource/lua-5.3.5/src/ldo.c"
"The-Forge/Common_3/Game/ThirdParty/OpenSource/lua-5.3.5/src/ldump.c"
"The-Forge/Common_3/Game/ThirdParty/OpenSource/lua-5.3.5/src/lfunc.c"
"The-Forge/Common_3/Game/ThirdParty/OpenSource/lua-5.3.5/src/lgc.c"
"The-Forge/Common_3/Game/ThirdParty/OpenSource/lua-5.3.5/src/linit.c"
"The-Forge/Common_3/Game/ThirdParty/OpenSource/lua-5.3.5/src/liolib.c"
"The-Forge/Common_3/Game/ThirdParty/OpenSource/lua-5.3.5/src/llex.c"
"The-Forge/Common_3/Game/ThirdParty/OpenSource/lua-5.3.5/src/lmathlib.c"
"The-Forge/Common_3/Game/ThirdParty/OpenSource/lua-5.3.5/src/lmem.c"
"The-Forge/Common_3/Game/ThirdParty/OpenSource/lua-5.3.5/src/loadlib.c"
"The-Forge/Common_3/Game/ThirdParty/OpenSource/lua-5.3.5/src/lobject.c"
"The-Forge/Common_3/Game/ThirdParty/OpenSource/lua-5.3.5/src/lopcodes.c"
"The-Forge/Common_3/Game/ThirdParty/OpenSource/lua-5.3.5/src/loslib.c"
"The-Forge/Common_3/Game/ThirdParty/OpenSource/lua-5.3.5/src/lparser.c"
"The-Forge/Common_3/Game/ThirdParty/OpenSource/lua-5.3.5/src/lstate.c"
"The-Forge/Common_3/Game/ThirdParty/OpenSource/lua-5.3.5/src/lstring.c"
"The-Forge/Common_3/Game/ThirdParty/OpenSource/lua-5.3.5/src/lstrlib.c"
"The-Forge/Common_3/Game/ThirdParty/OpenSource/lua-5.3.5/src/ltable.c"
"The-Forge/Common_3/Game/ThirdParty/OpenSource/lua-5.3.5/src/ltablib.c"
"The-Forge/Common_3/Game/ThirdParty/OpenSource/lua-5.3.5/src/ltm.c"
"The-Forge/Common_3/Game/ThirdParty/OpenSource/lua-5.3.5/src/lundump.c"
"The-Forge/Common_3/Game/ThirdParty/OpenSource/lua-5.3.5/src/lutf8lib.c"
"The-Forge/Common_3/Game/ThirdParty/OpenSource/lua-5.3.5/src/lvm.c"
"The-Forge/Common_3/Game/ThirdParty/OpenSource/lua-5.3.5/src/lzio.c"
"The-Forge/Common_3/Graphics/CommonShaderReflection.cpp"
"The-Forge/Common_3/Graphics/Direct3D11/Direct3D11.cpp"
"The-Forge/Common_3/Graphics/Direct3D11/Direct3D11ShaderReflection.cpp"
"The-Forge/Common_3/Graphics/Direct3D12/Direct3D12.cpp"
"The-Forge/Common_3/Graphics/Direct3D12/Direct3D12Hooks.cpp"
"The-Forge/Common_3/Graphics/Direct3D12/Direct3D12Raytracing.cpp"
"The-Forge/Common_3/Graphics/Direct3D12/Direct3D12ShaderReflection.cpp"
"The-Forge/Common_3/Graphics/GraphicsConfig.cpp"
"The-Forge/Common_3/Graphics/PickRenderingAPI.cpp"
"The-Forge/Common_3/Graphics/ThirdParty/OpenSource/SPIRV_Cross/spirv_cfg.cpp"
"The-Forge/Common_3/Graphics/ThirdParty/OpenSource/SPIRV_Cross/spirv_cpp.cpp"
"The-Forge/Common_3/Graphics/ThirdParty/OpenSource/SPIRV_Cross/spirv_cross_parsed_ir.cpp"
"The-Forge/Common_3/Graphics/ThirdParty/OpenSource/SPIRV_Cross/spirv_cross_util.cpp"
"The-Forge/Common_3/Graphics/ThirdParty/OpenSource/SPIRV_Cross/spirv_cross.cpp"
"The-Forge/Common_3/Graphics/ThirdParty/OpenSource/SPIRV_Cross/spirv_glsl.cpp"
"The-Forge/Common_3/Graphics/ThirdParty/OpenSource/SPIRV_Cross/spirv_hlsl.cpp"
"The-Forge/Common_3/Graphics/ThirdParty/OpenSource/SPIRV_Cross/spirv_msl.cpp"
"The-Forge/Common_3/Graphics/ThirdParty/OpenSource/SPIRV_Cross/spirv_parser.cpp"
"The-Forge/Common_3/Graphics/ThirdParty/OpenSource/SPIRV_Cross/spirv_reflect.cpp"
"The-Forge/Common_3/Graphics/ThirdParty/OpenSource/SPIRV_Cross/SpirvTools.cpp"
"The-Forge/Common_3/Graphics/Vulkan/Vulkan.cpp"
"The-Forge/Common_3/Graphics/Vulkan/VulkanRaytracing.cpp"
"The-Forge/Common_3/Graphics/Vulkan/VulkanShaderReflection.cpp"
"The-Forge/Common_3/OS/CPUConfig.cpp"
"The-Forge/Common_3/OS/WindowSystem/WindowSystem.cpp"
"The-Forge/Common_3/Resources/ResourceLoader/ResourceLoader.cpp"
"The-Forge/Common_3/Tools/Network/Network.c"
"The-Forge/Common_3/Tools/ReloadServer/ReloadClient.cpp"
"The-Forge/Common_3/Utilities/FileSystem/FileSystem.c"
"The-Forge/Common_3/Utilities/FileSystem/SystemRun.c"
"The-Forge/Common_3/Utilities/Log/Log.c"
"The-Forge/Common_3/Utilities/Math/Algorithms.c"
"The-Forge/Common_3/Utilities/Math/StbDs.c"
"The-Forge/Common_3/Utilities/MemoryTracking/MemoryTracking.c"
"The-Forge/Common_3/Utilities/ThirdParty/OpenSource/bstrlib/bstrlib.c"
"The-Forge/Common_3/Utilities/ThirdParty/OpenSource/lz4/lz4.c"
"The-Forge/Common_3/Utilities/ThirdParty/OpenSource/lz4/lz4.h"
"The-Forge/Common_3/Utilities/ThirdParty/OpenSource/lz4/lz4hc.c"
"The-Forge/Common_3/Utilities/ThirdParty/OpenSource/lz4/lz4hc.h"
"The-Forge/Common_3/Utilities/ThirdParty/OpenSource/zstd/common/bits.h"
"The-Forge/Common_3/Utilities/ThirdParty/OpenSource/zstd/common/bitstream.h"
"The-Forge/Common_3/Utilities/ThirdParty/OpenSource/zstd/common/compiler.h"
"The-Forge/Common_3/Utilities/ThirdParty/OpenSource/zstd/common/cpu.h"
"The-Forge/Common_3/Utilities/ThirdParty/OpenSource/zstd/common/debug.c"
"The-Forge/Common_3/Utilities/ThirdParty/OpenSource/zstd/common/debug.h"
"The-Forge/Common_3/Utilities/ThirdParty/OpenSource/zstd/common/entropy_common.c"
"The-Forge/Common_3/Utilities/ThirdParty/OpenSource/zstd/common/error_private.c"
"The-Forge/Common_3/Utilities/ThirdParty/OpenSource/zstd/common/error_private.h"
"The-Forge/Common_3/Utilities/ThirdParty/OpenSource/zstd/common/fse_decompress.c"
"The-Forge/Common_3/Utilities/ThirdParty/OpenSource/zstd/common/fse.h"
"The-Forge/Common_3/Utilities/ThirdParty/OpenSource/zstd/common/huf.h"
"The-Forge/Common_3/Utilities/ThirdParty/OpenSource/zstd/common/mem.h"
"The-Forge/Common_3/Utilities/ThirdParty/OpenSource/zstd/common/pool.c"
"The-Forge/Common_3/Utilities/ThirdParty/OpenSource/zstd/common/pool.h"
"The-Forge/Common_3/Utilities/ThirdParty/OpenSource/zstd/common/portability_macros.h"
"The-Forge/Common_3/Utilities/ThirdParty/OpenSource/zstd/common/threading.c"
"The-Forge/Common_3/Utilities/ThirdParty/OpenSource/zstd/common/threading.h"
"The-Forge/Common_3/Utilities/ThirdParty/OpenSource/zstd/common/xxhash.c"
"The-Forge/Common_3/Utilities/ThirdParty/OpenSource/zstd/common/xxhash.h"
"The-Forge/Common_3/Utilities/ThirdParty/OpenSource/zstd/common/zstd_common.c"
"The-Forge/Common_3/Utilities/ThirdParty/OpenSource/zstd/common/zstd_deps.h"
"The-Forge/Common_3/Utilities/ThirdParty/OpenSource/zstd/common/zstd_internal.h"
"The-Forge/Common_3/Utilities/ThirdParty/OpenSource/zstd/common/zstd_trace.h"
"The-Forge/Common_3/Utilities/ThirdParty/OpenSource/zstd/decompress/huf_decompress_amd64.S"
"The-Forge/Common_3/Utilities/ThirdParty/OpenSource/zstd/decompress/huf_decompress.c"
"The-Forge/Common_3/Utilities/ThirdParty/OpenSource/zstd/decompress/zstd_ddict.c"
"The-Forge/Common_3/Utilities/ThirdParty/OpenSource/zstd/decompress/zstd_ddict.h"
"The-Forge/Common_3/Utilities/ThirdParty/OpenSource/zstd/decompress/zstd_decompress_block.c"
"The-Forge/Common_3/Utilities/ThirdParty/OpenSource/zstd/decompress/zstd_decompress_block.h"
"The-Forge/Common_3/Utilities/ThirdParty/OpenSource/zstd/decompress/zstd_decompress_internal.h"
"The-Forge/Common_3/Utilities/ThirdParty/OpenSource/zstd/decompress/zstd_decompress.c"
"The-Forge/Common_3/Utilities/Timer.c"
$<$<PLATFORM_ID:Windows>:
"The-Forge/Common_3/OS/ThirdParty/OpenSource/cpu_features/src/impl_x86_windows.c"
"The-Forge/Common_3/OS/Windows/WindowsBase.cpp"
"The-Forge/Common_3/OS/Windows/WindowsFileSystem.cpp"
"The-Forge/Common_3/OS/Windows/WindowsLog.c"
"The-Forge/Common_3/OS/Windows/WindowsStackTraceDump.cpp"
"The-Forge/Common_3/OS/Windows/WindowsThread.c"
"The-Forge/Common_3/OS/Windows/WindowsTime.c"
"The-Forge/Common_3/OS/Windows/WindowsToolsFileSystem.cpp"
"The-Forge/Common_3/OS/Windows/WindowsWindow.cpp"
>
$<$<PLATFORM_ID:Linux>:
"The-Forge/Common_3/OS/ThirdParty/OpenSource/cpu_features/src/impl_x86_linux_or_android.c"
"The-Forge/Common_3/OS/Linux/LinuxBase.cpp"
"The-Forge/Common_3/OS/Linux/LinuxFileSystem.c"
"The-Forge/Common_3/OS/Linux/LinuxLog.c"
"The-Forge/Common_3/OS/Linux/LinuxThread.c"
"The-Forge/Common_3/OS/Linux/LinuxTime.c"
"The-Forge/Common_3/OS/Linux/LinuxToolsFileSystem.c"
"The-Forge/Common_3/OS/Linux/LinuxWindow.cpp"
"The-Forge/Common_3/Utilities/FileSystem/UnixFileSystem.c"
>
)
if (MSVC)
target_compile_definitions (the-forge PRIVATE -D_UNICODE -DUNICODE)
target_compile_definitions (the-forge PRIVATE -D_CRT_SECURE_NO_WARNINGS)
endif ()
if(LINUX)
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(PkgConfig REQUIRED)
find_package(X11 REQUIRED)
find_package(Threads REQUIRED)
pkg_check_modules(GTK REQUIRED gtk+-3.0 )
pkg_check_modules(UDEV REQUIRED libudev)
include_directories ( ${GTK_INCLUDE_DIRS} )
target_include_directories(the-forge PRIVATE
${GTK_INCLUDE_DIRS}
${X11_INCLUDE_DIRS}
)
target_link_libraries(the-forge PRIVATE
${GTK_LIBRARIES}
${X11_LIBRARIES}
${X11_Xrandr_LIB}
Threads::Threads
${CMAKE_DL_LIBS}
)
target_link_libraries(gainput PRIVATE
${UDEV_LIBRARIES}
)
endif()
add_executable(main
"src/DemoScene.cpp"
"src/DemoScene.h"
"src/MainApp.cpp"
)
target_link_libraries(main PRIVATE
the-forge
gainput
)
if (WIN32)
target_link_libraries(main PRIVATE
"${CMAKE_CURRENT_SOURCE_DIR}/The-Forge/Common_3/OS/ThirdParty/OpenSource/winpixeventruntime/bin/WinPixEventRuntime.lib"
"${CMAKE_CURRENT_SOURCE_DIR}/The-Forge/Common_3/Graphics/ThirdParty/OpenSource/ags/ags_lib/lib/amd_ags_x64.lib"
"${CMAKE_CURRENT_SOURCE_DIR}/The-Forge/Common_3/Graphics/ThirdParty/OpenSource/nvapi/amd64/nvapi64.lib"
"${CMAKE_CURRENT_SOURCE_DIR}/The-Forge/Common_3/Graphics/ThirdParty/OpenSource/DirectXShaderCompiler/lib/x64/dxcompiler.lib"
XInput
)
add_custom_target(CopyDlls ALL
COMMAND ${CMAKE_COMMAND} -E make_directory "$<TARGET_FILE_DIR:main>/"
COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/The-Forge/Common_3/OS/ThirdParty/OpenSource/winpixeventruntime/bin/WinPixEventRuntime.dll" "$<TARGET_FILE_DIR:main>/"
COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/The-Forge/Common_3/Graphics/ThirdParty/OpenSource/ags/ags_lib/lib/amd_ags_x64.dll" "$<TARGET_FILE_DIR:main>/"
COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/The-Forge/Common_3/Graphics/ThirdParty/OpenSource/DirectXShaderCompiler/bin/x64/dxcompiler.dll" "$<TARGET_FILE_DIR:main>/"
COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/The-Forge/Common_3/Graphics/ThirdParty/OpenSource/DirectXShaderCompiler/bin/x64/dxil.dll" "$<TARGET_FILE_DIR:main>/"
)
elseif (LINUX)
add_custom_target(CopyVulkan ALL
COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/The-Forge/Common_3/Graphics/ThirdParty/OpenSource/VulkanSDK/bin/Linux/VkLayer_khronos_validation.json" "$<TARGET_FILE_DIR:main>"
COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/The-Forge/Common_3/Graphics/ThirdParty/OpenSource/VulkanSDK/bin/Linux/libVkLayer_khronos_validation.so" "$<TARGET_FILE_DIR:main>"
)
endif()
target_compile_features(main PRIVATE cxx_std_11)
set_property(TARGET main PROPERTY CXX_STANDARD 11)
set_property(TARGET main PROPERTY CXX_STANDARD_REQUIRED ON)
if (MSVC)
add_compile_definitions(D3D12_AGILITY_SDK_VERSION 611)
target_compile_options(main PRIVATE /Zc:__cplusplus)
endif ()
target_include_directories(main PRIVATE
"The-Forge/Common_3/Application/Interfaces"
"The-Forge/Common_3/Application/ThirdParty/OpenSource/gainput/lib/source"
"The-Forge/Common_3/Graphics/Interfaces"
"The-Forge/Common_3/Graphics/ThirdParty/OpenSource/DirectXShaderCompiler/inc"
"The-Forge/Common_3/OS/Interfaces"
"The-Forge/Common_3/Resources/ResourceLoader/Interfaces"
"The-Forge/Common_3/Utilities"
"The-Forge/Common_3/Utilities/Interfaces"
"The-Forge/Common_3/Utilities/ThirdParty/OpenSource/Nothings/"
${VULKAN_HEADERS_INCLUDE_DIRS}
)
target_link_directories(main PRIVATE
"The-Forge/Common_3/Graphics/ThirdParty/OpenSource/ags/ags_lib/lib"
"The-Forge/Common_3/Graphics/ThirdParty/OpenSource/DirectXShaderCompiler/lib/x64"
"The-Forge/Common_3/Graphics/ThirdParty/OpenSource/nvapi/amd64"
"The-Forge/Common_3/OS/ThirdParty/OpenSource/winpixeventruntime/bin"
)
add_custom_target(CopyGpuCfg ALL
COMMAND ${CMAKE_COMMAND} -E make_directory "$<TARGET_FILE_DIR:main>/GPUCfg/"
COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/The-Forge/Examples_3/Unit_Tests/src/01_Transformations/GPUCfg/gpu.cfg" "$<TARGET_FILE_DIR:main>/GPUCfg/"
)
add_custom_target(CopyFonts ALL
COMMAND ${CMAKE_COMMAND} -E make_directory "$<TARGET_FILE_DIR:main>/Fonts/Lato/"
COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/assets/Fonts/Lato/Lato-Bold.ttf" "$<TARGET_FILE_DIR:main>/Fonts/Lato/"
)
if(WIN32)
set(Python3_ROOT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/The-Forge/Tools/python-3.6.0-embed-amd64")
endif()
find_package(Python3 COMPONENTS Interpreter)
function(compile_shaders)
set(oneValueArgs TARGET SHADER_LIST)
cmake_parse_arguments(COMPILE_SHADERS "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
add_custom_target(${COMPILE_SHADERS_TARGET} ALL
COMMAND ${CMAKE_COMMAND} -E make_directory "$<TARGET_FILE_DIR:main>/Shaders"
COMMAND ${CMAKE_COMMAND} -E make_directory "$<TARGET_FILE_DIR:main>/CompiledShaders"
COMMAND "${Python3_EXECUTABLE}"
"${CMAKE_CURRENT_SOURCE_DIR}/The-Forge/Common_3/Tools/ForgeShadingLanguage/fsl.py"
"-dShaders" "-bCompiledShaders" "-l $<$<PLATFORM_ID:Windows>:DIRECT3D12> VULKAN" --compile --verbose
${COMPILE_SHADERS_SHADER_LIST}
WORKING_DIRECTORY "$<TARGET_FILE_DIR:main>"
)
endfunction()
compile_shaders(
TARGET UiShader
SHADER_LIST "${CMAKE_CURRENT_SOURCE_DIR}/The-Forge/Common_3/Application/UI/Shaders/FSL/UI_ShaderList.fsl"
)
compile_shaders(
TARGET FontShader
SHADER_LIST "${CMAKE_CURRENT_SOURCE_DIR}/The-Forge/Common_3/Application/Fonts/Shaders/FSL/Fonts_ShaderList.fsl"
)
compile_shaders(
TARGET ProjectShader
SHADER_LIST "${CMAKE_CURRENT_SOURCE_DIR}/shaders/FSL/ShaderList.fsl"
)