-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
69 lines (57 loc) · 2.27 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
cmake_minimum_required (VERSION 3.8)
set(CMAKE_CXX_STANDARD 20)
project(VolumeRenderer CXX)
# Enable file creation for Dependencies folder
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
file(MAKE_DIRECTORY build/output)
add_executable(VolumeRenderer
VertexShader.hlsl
PixelShader.hlsl
VolumeBoundsVertex.hlsl
VolumeBoundsPixel.hlsl
Camera.h
Types.h
DescriptorHeap.h
Queue.h
Window.h
Device.h
Application.h
Camera.cpp
DescriptorHeap.cpp
Queue.cpp
Window.cpp
Device.cpp
Application.cpp
Main.cpp
)
source_group(Shaders FILES
PixelShader.hlsl
VertexShader.hlsl
VolumeBoundsVertex.hlsl
VolumeBoundsPixel.hlsl
)
set_source_files_properties(VertexShader.hlsl PROPERTIES VS_SHADER_TYPE "Vertex" VS_SHADER_MODEL "6.6" VS_SHADER_ENTRYPOINT "VSMain" VS_SHADER_DISABLE_OPTIMIZATIONS true VS_SHADER_ENABLE_DEBUG true
VS_SHADER_OBJECT_FILE_NAME "${CMAKE_BINARY_DIR}/VertexShader.cso")
set_source_files_properties(PixelShader.hlsl PROPERTIES VS_SHADER_TYPE "Pixel" VS_SHADER_MODEL "6.6" VS_SHADER_ENTRYPOINT "PSMain" VS_SHADER_DISABLE_OPTIMIZATIONS true VS_SHADER_ENABLE_DEBUG true
VS_SHADER_OBJECT_FILE_NAME "${CMAKE_BINARY_DIR}/PixelShader.cso")
set_source_files_properties(VolumeBoundsVertex.hlsl PROPERTIES VS_SHADER_TYPE "Vertex" VS_SHADER_MODEL "6.6" VS_SHADER_ENTRYPOINT "VSMain" VS_SHADER_DISABLE_OPTIMIZATIONS true VS_SHADER_ENABLE_DEBUG true
VS_SHADER_OBJECT_FILE_NAME "${CMAKE_BINARY_DIR}/VolumeBoundsVertex.cso")
set_source_files_properties(VolumeBoundsPixel.hlsl PROPERTIES VS_SHADER_TYPE "Pixel" VS_SHADER_MODEL "6.6" VS_SHADER_ENTRYPOINT "PSMain" VS_SHADER_DISABLE_OPTIMIZATIONS true VS_SHADER_ENABLE_DEBUG true
VS_SHADER_OBJECT_FILE_NAME "${CMAKE_BINARY_DIR}/VolumeBoundsPixel.cso")
target_include_directories(VolumeRenderer PRIVATE ${CMAKE_BINARY_DIR})
target_link_libraries(
VolumeRenderer PUBLIC
d3d12
d3dcompiler
dxgi
user32
)
target_precompile_headers(VolumeRenderer PRIVATE stdafx.h)
target_compile_definitions(VolumeRenderer PRIVATE
RESOURCE_DIR="${CMAKE_CURRENT_SOURCE_DIR}/Resources"
)
# D3D12MA
add_subdirectory(ThirdParty/D3D12MemoryAllocator EXCLUDE_FROM_ALL)
target_link_libraries(VolumeRenderer PUBLIC D3D12MemoryAllocator)
# Add third party libraries to dependencies folder
set_property(TARGET D3D12MemoryAllocator PROPERTY FOLDER "Dependencies")