-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
137 lines (102 loc) · 1.56 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
cmake_minimum_required(VERSION 3.12)
project(space_refraction)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
find_package(Threads REQUIRED)
add_subdirectory(asyncpp)
add_compile_definitions(
GL_GLEXT_PROTOTYPES
GLM_FORCE_ALIGNED_GENTYPES
GLM_FORCE_DEFAULT_ALIGNED_GENTYPES
GLM_FORCE_INTRINSICS
)
include_directories(.)
add_executable(space_refraction
main.cxx
#shaders.cxx
shader.cxx
io.cxx
)
target_link_libraries(space_refraction
glfw
GL
fmt
png
)
add_executable(prog2
prog2.cxx
)
add_executable(prog3
prog3.cxx
render.cxx
scene.cxx
trace.cxx
)
option(MULTITHREAD "Use multithreading" ON)
option(DRAFT "Draft rendering" ON)
target_link_libraries(prog3
Threads::Threads
)
target_include_directories(prog3 PRIVATE
pcg-cpp/include/
)
target_compile_definitions(prog3 PRIVATE
THREADS=$<BOOL:${MULTITHREAD}>
BEST=$<NOT:$<BOOL:${DRAFT}>>
)
add_executable(prog4
prog4.cxx
)
target_link_libraries(prog4
Threads::Threads
glfw
GL
)
add_executable(prog5
prog5.cxx
)
target_link_libraries(prog5
Threads::Threads
glfw
GL
asyncpp
)
target_compile_definitions(prog5 PUBLIC
DIM=2
)
add_executable(prog6
prog6.cxx
shader.cxx
io.cxx
)
target_link_libraries(prog6
Threads::Threads
glfw
GL
asyncpp
png
fmt
)
target_compile_definitions(prog6 PUBLIC
DIM=3
)
target_include_directories(prog6 PRIVATE
pcg-cpp/include/
)
add_executable(scatter
scatter.cxx
)
target_link_libraries(scatter
asyncpp
fmt
)
add_executable(cubify
cubify.cxx
)
target_link_libraries(cubify
asyncpp
fmt
SDL2
SDL2_image
Threads::Threads
)