-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
173 lines (138 loc) · 8.78 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
cmake_minimum_required(VERSION 3.23)
project(Stardust)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_EXE_LINKER_FLAGS "-static")
set(PYTHON "py")
# Set up dependencies
find_package(Vulkan REQUIRED)
add_subdirectory(ThirdParty/glfw)
add_subdirectory(ThirdParty/stduuid)
add_subdirectory(ThirdParty/glm)
add_compile_definitions(GLM_FORCE_DEPTH_ZERO_TO_ONE)
set(IMGUI_DIR ThirdParty/imgui)
include_directories(${IMGUI_DIR} ${IMGUI_DIR}/backends)
set(IMNODES_DIR ThirdParty/imnodes)
include_directories(${IMNODES_DIR})
add_executable(${PROJECT_NAME}
Stardust/main.cpp
# Stardust/pch.hpp
ThirdParty/stb/stb_image.cpp ThirdParty/stb/stb_image.h
ThirdParty/tinyobj/tiny_obj_impl.cpp
${IMGUI_DIR}/backends/imgui_impl_glfw.cpp ${IMGUI_DIR}/backends/imgui_impl_vulkan.cpp
${IMGUI_DIR}/imgui.cpp ${IMGUI_DIR}/imgui.h ${IMGUI_DIR}/imgui_draw.cpp
${IMGUI_DIR}/imgui_demo.cpp ${IMGUI_DIR}/imgui_tables.cpp ${IMGUI_DIR}/imgui_widgets.cpp
${IMNODES_DIR}/imnodes.cpp
Stardust/Window/Window.hpp Stardust/Window/Window.cpp
Stardust/Window/WindowOptions.hpp
Stardust/Application/Application.hpp Stardust/Application/Application.cpp
Stardust/Application/ApplicationOptions.hpp
Stardust/Application/Configuration.hpp
Stardust/Benchmarking.hpp
Stardust/Utility.hpp
Stardust/Resources/CameraUniformData.hpp
Stardust/Resources/Geometry.hpp
Stardust/Resources/VertexData.hpp
Stardust/Resources/Primitives/Cube.hpp
Stardust/Resources/Primitives/Sphere.hpp
Stardust/Vulkan/Buffer.hpp Stardust/Vulkan/Buffer.cpp
Stardust/Vulkan/Context.cpp Stardust/Vulkan/Context.hpp
Stardust/Vulkan/ContextBuilder.cpp Stardust/Vulkan/ContextBuilder.hpp Stardust/Vulkan/ContextOptions.hpp
Stardust/Vulkan/CommandBuffers.cpp Stardust/Vulkan/CommandBuffers.hpp
Stardust/Vulkan/DeviceFeatures.hpp
Stardust/Vulkan/Utils.hpp
Stardust/Vulkan/Queues.hpp
Stardust/Vulkan/Image/Sampler.hpp
Stardust/Vulkan/Rendering/ShaderModule.cpp Stardust/Vulkan/Rendering/ShaderModule.hpp
Stardust/Vulkan/Rendering/Mesh.cpp Stardust/Vulkan/Rendering/Mesh.hpp
Stardust/Vulkan/Rendering/Pipeline.hpp
Stardust/Vulkan/Rendering/PipelineBuilder.cpp Stardust/Vulkan/Rendering/PipelineBuilder.hpp
Stardust/Vulkan/Rendering/PipelineState.cpp Stardust/Vulkan/Rendering/PipelineState.hpp
Stardust/Vulkan/Rendering/RenderPass.hpp Stardust/Vulkan/Rendering/RenderPass.cpp
Stardust/Vulkan/Presentation/Swapchain.cpp Stardust/Vulkan/Presentation/Swapchain.hpp
Stardust/Vulkan/Presentation/SwapchainBuilder.hpp Stardust/Vulkan/Presentation/SwapchainBuilder.cpp
Stardust/Vulkan/Presentation/SwapchainCapabilities.hpp
Stardust/Vulkan/Raytracing/Blas.cpp Stardust/Vulkan/Raytracing/Blas.hpp
Stardust/Vulkan/Raytracing/Tlas.cpp Stardust/Vulkan/Raytracing/Tlas.hpp
Stardust/Vulkan/Raytracing/ShaderBindingTable.hpp
Stardust/Scene/Transform.hpp
Stardust/Scene/Object.hpp
Stardust/Scene/Light.hpp
Stardust/Scene/Camera.cpp Stardust/Scene/Camera.hpp
Stardust/Scene/Scene.hpp Stardust/Scene/Scene.cpp
Stardust/Nebula/Barrier.hpp Stardust/Nebula/Barrier.cpp
Stardust/Nebula/Descriptor.hpp Stardust/Nebula/Descriptor.cpp
Stardust/Nebula/Framebuffer.hpp Stardust/Nebula/Framebuffer.cpp
Stardust/Nebula/Image.hpp Stardust/Nebula/Image.cpp
Stardust/Nebula/ImageResolve.hpp
Stardust/Nebula/ImageBlit.hpp
Stardust/Math/Graph/Vertex.hpp
Stardust/VirtualGraph/Common/GraphContext.hpp Stardust/VirtualGraph/Common/GraphContext.cpp
Stardust/VirtualGraph/Common/NodeType.hpp Stardust/VirtualGraph/Common/NodeType.cpp
Stardust/VirtualGraph/Common/ResourceType.hpp Stardust/VirtualGraph/Common/ResourceType.cpp
Stardust/VirtualGraph/Common/RenderPath.hpp
Stardust/VirtualGraph/Compile/GraphCompileStrategy.hpp Stardust/VirtualGraph/Compile/GraphCompileStrategy.cpp
Stardust/VirtualGraph/Compile/DefaultCompileStrategy.hpp Stardust/VirtualGraph/Compile/DefaultCompileStrategy.cpp
Stardust/VirtualGraph/Compile/CompileResult.hpp
Stardust/VirtualGraph/Compile/OptimizedCompileStrategy.hpp Stardust/VirtualGraph/Compile/OptimizedCompileStrategy.cpp
Stardust/VirtualGraph/Compile/CompilerType.hpp
Stardust/VirtualGraph/Compile/Algorithm/Bfs.hpp Stardust/VirtualGraph/Compile/Algorithm/Bfs.cpp
Stardust/VirtualGraph/Compile/Algorithm/ResourceOptimizer.hpp
Stardust/VirtualGraph/Compile/Algorithm/TopologicalSort.hpp Stardust/VirtualGraph/Compile/Algorithm/TopologicalSort.cpp
Stardust/VirtualGraph/Editor/Edge.hpp
Stardust/VirtualGraph/Editor/GraphEditor.hpp Stardust/VirtualGraph/Editor/GraphEditor.cpp
Stardust/VirtualGraph/Editor/Node.hpp Stardust/VirtualGraph/Editor/Node.cpp
Stardust/VirtualGraph/Editor/ResourceDescription.hpp
Stardust/VirtualGraph/RenderGraph/Nodes/Node.hpp
Stardust/VirtualGraph/RenderGraph/Nodes/AntiAliasingNode.hpp
Stardust/VirtualGraph/RenderGraph/Nodes/BlurNode.hpp Stardust/VirtualGraph/RenderGraph/Nodes/BlurNode.cpp
Stardust/VirtualGraph/RenderGraph/Nodes/AmbientOcclusionNode.hpp Stardust/VirtualGraph/RenderGraph/Nodes/AmbientOcclusionNode.cpp
Stardust/VirtualGraph/RenderGraph/Nodes/AntiAliasingNode.cpp
Stardust/VirtualGraph/RenderGraph/Nodes/GBufferPass.hpp Stardust/VirtualGraph/RenderGraph/Nodes/GBufferPass.cpp
Stardust/VirtualGraph/RenderGraph/Nodes/LightingPass.hpp Stardust/VirtualGraph/RenderGraph/Nodes/LightingPass.cpp
Stardust/VirtualGraph/RenderGraph/Nodes/MeshGBufferPass.hpp Stardust/VirtualGraph/RenderGraph/Nodes/MeshGBufferPass.cpp
Stardust/VirtualGraph/RenderGraph/Nodes/PresentNode.hpp Stardust/VirtualGraph/RenderGraph/Nodes/PresentNode.cpp
Stardust/VirtualGraph/RenderGraph/Nodes/RayTracingNode.hpp Stardust/VirtualGraph/RenderGraph/Nodes/RayTracingNode.cpp
Stardust/VirtualGraph/RenderGraph/Nodes/SceneProviderNode.hpp Stardust/VirtualGraph/RenderGraph/Nodes/SceneProviderNode.cpp
Stardust/VirtualGraph/RenderGraph/Nodes/AmbientOcclusion/AmbientOcclusionMode.hpp
Stardust/VirtualGraph/RenderGraph/Nodes/AmbientOcclusion/AmbientOcclusionOptions.hpp
Stardust/VirtualGraph/RenderGraph/Nodes/AmbientOcclusion/AmbientOcclusionStrategy.hpp Stardust/VirtualGraph/RenderGraph/Nodes/AmbientOcclusion/AmbientOcclusionStrategy.cpp
Stardust/VirtualGraph/RenderGraph/Nodes/AmbientOcclusion/ScreenSpaceAO.hpp Stardust/VirtualGraph/RenderGraph/Nodes/AmbientOcclusion/ScreenSpaceAO.cpp
Stardust/VirtualGraph/RenderGraph/Nodes/AmbientOcclusion/RayTracedAO.hpp Stardust/VirtualGraph/RenderGraph/Nodes/AmbientOcclusion/RayTracedAO.cpp
Stardust/VirtualGraph/RenderGraph/Resources/Resource.hpp
Stardust/VirtualGraph/RenderGraph/Resources/ResourceSpecification.hpp
Stardust/VirtualGraph/RenderGraph/Resources/ResourceRole.hpp Stardust/VirtualGraph/RenderGraph/Resources/ResourceRole.cpp
Stardust/VirtualGraph/Builder/Builder.h Stardust/VirtualGraph/Builder/Builder.cpp
Stardust/Application/MeshShaderApp.cpp
Stardust/Application/MeshShaderApp.hpp
Stardust/VirtualGraph/Common/NodeFactory.hpp
Stardust/VirtualGraph/Common/NodeFactory.cpp
Stardust/Nebula/Utility.hpp
)
# target_precompile_headers(${PROJECT_NAME} PRIVATE Stardust/pch.hpp)
add_library(ffx_fsr2_api_x64d SHARED IMPORTED)
set_property(TARGET ffx_fsr2_api_x64d PROPERTY IMPORTED_LOCATION "${CMAKE_CURRENT_SOURCE_DIR}/lib/ffx_fsr2_api_x64d.dll")
set_property(TARGET ffx_fsr2_api_x64d PROPERTY IMPORTED_IMPLIB "${CMAKE_CURRENT_SOURCE_DIR}/lib/ffx_fsr2_api_x64d.dll")
add_library(ffx_fsr2_api_vk_x64d SHARED IMPORTED)
set_property(TARGET ffx_fsr2_api_vk_x64d PROPERTY IMPORTED_LOCATION "${CMAKE_CURRENT_SOURCE_DIR}/lib/ffx_fsr2_api_vk_x64d.dll")
set_property(TARGET ffx_fsr2_api_vk_x64d PROPERTY IMPORTED_IMPLIB "${CMAKE_CURRENT_SOURCE_DIR}/lib/ffx_fsr2_api_vk_x64d.dll")
target_link_libraries(${PROJECT_NAME} LINK_PUBLIC ${Vulkan_LIBRARIES} ffx_fsr2_api_x64d ffx_fsr2_api_vk_x64d)
target_link_libraries(${PROJECT_NAME} PUBLIC glm stduuid glfw)
target_include_directories(${PROJECT_NAME}
PUBLIC
${Vulkan_INCLUDE_DIRS}
Stardust
ThirdParty/stb
ThirdParty/tinyobj
ThirdParty/stduuid/include
ThirdParty/glm
ThirdParty/glfw/include
ThirdParty/FFX_FSR
ThirdParty/json/include)
target_compile_definitions(${PROJECT_NAME} PUBLIC
GLM_ENABLE_EXPERIMENTAL
IMGUI_DEFINE_MATH_OPERATORS
UUID_SYSTEM_GENERATOR
VULKAN_HPP_DISPATCH_LOADER_DYNAMIC=1
SD_DEBUG
RENDER_GRAPH_NAMESPACE=Nebula::RG
-DImTextureID=ImU64)