-
Notifications
You must be signed in to change notification settings - Fork 0
/
oldCMakeLists.txt
379 lines (316 loc) · 16.6 KB
/
oldCMakeLists.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
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
cmake_minimum_required (VERSION 2.8)
project (ProjectDraw_Slim)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules")
file(GLOB_RECURSE ENGINE_SRC
"src/Core/*.h"
"src/Core/*.cpp"
)
file(GLOB_RECURSE CUDARENDER_SRC
"src/CudaRender/*.h"
"src/CudaRender/*.cpp"
)
file(GLOB_RECURSE RECORDER_SRC
"src/Recorder/*.h"
"src/Recorder/*.cpp"
)
file(GLOB_RECURSE PHYSICS_SRC
"src/Physics/*.h"
"src/Physics/*.cpp"
)
file(GLOB_RECURSE EXAMPLE_3D_SRC
"examples/3d_demo/*.h"
"examples/3d_demo/*.cpp"
)
file(GLOB_RECURSE EXAMPLE_PHYSICS3D_SRC
"examples/physics3d_example/*.h"
"examples/physics3d_example/*.cpp"
)
file(GLOB_RECURSE EXPERIMENTAL_OPENGL
"test/opengl_test/*.h"
"test/opengl_test/*.cpp"
)
if (UNIX)
set(BulletLibraries
debug /home/vincent/Development/Lib/Cpp/bullet3/lib/debug/lib/libBullet3Common.a
debug /home/vincent/Development/Lib/Cpp/bullet3/lib/debug/lib/libBulletSoftBody.a
debug /home/vincent/Development/Lib/Cpp/bullet3/lib/debug/lib/libBulletDynamics.a
debug /home/vincent/Development/Lib/Cpp/bullet3/lib/debug/lib/libBulletCollision.a
debug /home/vincent/Development/Lib/Cpp/bullet3/lib/debug/lib/libBulletInverseDynamics.a
debug /home/vincent/Development/Lib/Cpp/bullet3/lib/debug/lib/libLinearMath.a
optimized /home/vincent/Development/Lib/Cpp/bullet3/lib/release/lib/libBullet3Common.a
optimized /home/vincent/Development/Lib/Cpp/bullet3/lib/release/lib/libBulletSoftBody.a
optimized /home/vincent/Development/Lib/Cpp/bullet3/lib/release/lib/libBulletDynamics.a
optimized /home/vincent/Development/Lib/Cpp/bullet3/lib/release/lib/libBulletCollision.a
optimized /home/vincent/Development/Lib/Cpp/bullet3/lib/release/lib/libBulletInverseDynamics.a
optimized /home/vincent/Development/Lib/Cpp/bullet3/lib/release/lib/libLinearMath.a
)
find_package(GLEW REQUIRED)
find_package(assimp REQUIRED)
find_package(glfw3 REQUIRED)
find_package(OpenGL REQUIRED)
find_package(Freetype REQUIRED)
add_library(projectdraw_core ${ENGINE_SRC})
include_directories(${OPENGL_INCLUDE_DIRS} ${GLFW_INCLUDE_DIRS} ${GLEW_INCLUDE_DIRS} ${SOIL_INCLUDE_DIRS} ${FREETYPE_INCLUDE_DIRS}
/home/vincent/Development/Lib/Cpp/stb-master
/home/vincent/Development/Lib/Cpp/glm-0.9.9.0/
)
target_link_libraries(projectdraw_core
#Assimp
debug /home/vincent/Development/Lib/Cpp/assimp-master/build/debug/lib/libassimpd.so
optimized /home/vincent/Development/Lib/Cpp/assimp-master/build/release/lib/libassimp.so
${OPENGL_LIBRARIES}
${GLEW_LIBRARIES}
${SOIL_LIBRARIES}
${FREETYPE_LIBRARIES}
)
add_library(projectdraw_physics3d ${PHYSICS_SRC})
include_directories(
/home/vincent/Development/Lib/Cpp/bullet3/src/
/home/vincent/Development/Cpp/projectdraw_slim/src/
)
target_link_libraries(projectdraw_physics3d
${BulletLibraries}
debug /home/vincent/Development/Cpp/projectdraw_slim/build/debug/libprojectdraw_core.a
optimized /home/vincent/Development/Cpp/projectdraw_slim/build/release/libprojectdraw_core.a
)
#Examples
#Scene3D Example
include_directories(
/home/vincent/Development/Lib/Cpp/glm-0.9.9.0/
/home/vincent/Development/Cpp/projectdraw_slim/src/
/home/vincent/Development/Lib/Cpp/stb-master/
${FREETYPE_INCLUDE_DIRS}
${OPENGL_INCLUDE_DIRS}
${GLEW_INCLUDE_DIRS}
)
add_executable(3d_example ${EXAMPLE_3D_SRC})
add_dependencies(3d_example projectdraw_core)
target_link_libraries(3d_example
sfml-graphics
sfml-window
sfml-system
debug /home/vincent/Development/Cpp/projectdraw_slim/build/debug/libprojectdraw_core.a
optimized /home/vincent/Development/Cpp/projectdraw_slim/build/release/libprojectdraw_core.a
${FREETYPE_LIBRARIES}
${OPENGL_LIBRARIES}
${GLEW_LIBRARIES}
debug /home/vincent/Development/Lib/Cpp/assimp-master/build/debug/lib/libassimpd.so
optimized /home/vincent/Development/Lib/Cpp/assimp-master/build/release/lib/libassimp.so
)
#Physics3D Example
include_directories(
/home/vincent/Development/Lib/Cpp/glm-0.9.9.0/
/home/vincent/Development/Cpp/projectdraw_slim/src/
/home/vincent/Development/Lib/Cpp/stb-master/
${FREETYPE_INCLUDE_DIRS}
${OPENGL_INCLUDE_DIRS}
${GLEW_INCLUDE_DIRS}
)
add_executable(physics3d_example ${EXAMPLE_PHYSICS3D_SRC})
add_dependencies(physics3d_example projectdraw_core projectdraw_physics3d)
target_link_libraries(physics3d_example
sfml-graphics
sfml-window
sfml-system
debug /home/vincent/Development/Cpp/projectdraw_slim/build/debug/libprojectdraw_core.a
debug /home/vincent/Development/Cpp/projectdraw_slim/build/debug/libprojectdraw_physics3d.a
optimized /home/vincent/Development/Cpp/projectdraw_slim/build/release/libprojectdraw_core.a
optimized /home/vincent/Development/Cpp/projectdraw_slim/build/release/libprojectdraw_physics3d.a
${FREETYPE_LIBRARIES}
${OPENGL_LIBRARIES}
${GLEW_LIBRARIES}
${BulletLibraries}
debug /home/vincent/Development/Lib/Cpp/assimp-master/build/debug/lib/libassimpd.so
optimized /home/vincent/Development/Lib/Cpp/assimp-master/build/release/lib/libassimp.so
)
#Experimental
add_executable(opengl_test ${EXPERIMENTAL_OPENGL})
add_dependencies(opengl_test projectdraw_core projectdraw_physics3d)
target_link_libraries(opengl_test
sfml-graphics
sfml-window
sfml-system
debug /home/vincent/Development/Cpp/projectdraw_slim/build/debug/libprojectdraw_core.a
debug /home/vincent/Development/Cpp/projectdraw_slim/build/debug/libprojectdraw_physics3d.a
optimized /home/vincent/Development/Cpp/projectdraw_slim/build/release/libprojectdraw_core.a
optimized /home/vincent/Development/Cpp/projectdraw_slim/build/release/libprojectdraw_physics3d.a
${FREETYPE_LIBRARIES}
${OPENGL_LIBRARIES}
${GLEW_LIBRARIES}
${BulletLibraries}
debug /home/vincent/Development/Lib/Cpp/assimp-master/build/debug/lib/libassimpd.so
optimized /home/vincent/Development/Lib/Cpp/assimp-master/build/release/lib/libassimp.so
)
endif()
if(WIN32)
include_directories(C:/Users/Vincent/Documents/Projects/Lib/vcpkg/installed/x64-windows/include)
include_directories(C:/Users/Vincent/Documents/Projects/Lib/C++/stb)
set(OpenGLLibs
C:/Program\ Files\ \(x86\)/Windows\ Kits/10/Lib/10.0.17763.0/um/x64/OpenGL32.lib
)
set(BulletLibraries
debug C:/Users/Vincent/Documents/Projects/Lib/vcpkg/installed/x64-windows/debug/lib/BulletSoftBody_Debug.lib
debug C:/Users/Vincent/Documents/Projects/Lib/vcpkg/installed/x64-windows/debug/lib/BulletInverseDynamics_Debug.lib
#debug C:/Users/Vincent/Documents/Projects/Lib/vcpkg/installed/x64-windows/debug/lib/BulletInverseDynamicsUtils_Debug.lib
debug C:/Users/Vincent/Documents/Projects/Lib/vcpkg/installed/x64-windows/debug/lib/BulletDynamics_Debug.lib
debug C:/Users/Vincent/Documents/Projects/Lib/vcpkg/installed/x64-windows/debug/lib/BulletCollision_Debug.lib
#debug C:/Users/Vincent/Documents/Projects/Lib/vcpkg/installed/x64-windows/debug/lib/Bullet3Geometry_Debug.lib
debug C:/Users/Vincent/Documents/Projects/Lib/vcpkg/installed/x64-windows/debug/lib/Bullet3Common_Debug.lib
#debug C:/Users/Vincent/Documents/Projects/Lib/vcpkg/installed/x64-windows/debug/lib/Bullet3Dynamics_Debug.lib
#debug C:/Users/Vincent/Documents/Projects/Lib/vcpkg/installed/x64-windows/debug/lib/Bullet3Collision_Debug.lib
debug C:/Users/Vincent/Documents/Projects/Lib/vcpkg/installed/x64-windows/debug/lib/LinearMath_Debug.lib
optimized C:/Users/Vincent/Documents/Projects/Lib/vcpkg/installed/x64-windows/lib/BulletSoftBody.lib
optimized C:/Users/Vincent/Documents/Projects/Lib/vcpkg/installed/x64-windows/lib/BulletInverseDynamics.lib
#optimized C:/Users/Vincent/Documents/Projects/Lib/vcpkg/installed/x64-windows/lib/BulletInverseDynamicsUtils.lib
optimized C:/Users/Vincent/Documents/Projects/Lib/vcpkg/installed/x64-windows/lib/BulletDynamics.lib
optimized C:/Users/Vincent/Documents/Projects/Lib/vcpkg/installed/x64-windows/lib/BulletCollision.lib
#optimized C:/Users/Vincent/Documents/Projects/Lib/vcpkg/installed/x64-windows/lib/Bullet3Geometry.lib
optimized C:/Users/Vincent/Documents/Projects/Lib/vcpkg/installed/x64-windows/lib/Bullet3Common.lib
#optimized C:/Users/Vincent/Documents/Projects/Lib/vcpkg/installed/x64-windows/lib/Bullet3Dynamics.lib
#optimized C:/Users/Vincent/Documents/Projects/Lib/vcpkg/installed/x64-windows/lib/Bullet3Collision.lib
optimized C:/Users/Vincent/Documents/Projects/Lib/vcpkg/installed/x64-windows/lib/LinearMath.lib
)
set(ProjectDrawLibraries
debug C:/Users/Vincent/Documents/Projects/C++/projectdraw_slim/build/Debug/projectdraw_core.lib
optimized C:/Users/Vincent/Documents/Projects/C++/projectdraw_slim/build/Release/projectdraw_core.lib
debug C:/Users/Vincent/Documents/Projects/C++/projectdraw_slim/build/Debug/projectdraw_physics3d.lib
optimized C:/Users/Vincent/Documents/Projects/C++/projectdraw_slim/build/Release/projectdraw_physics3d.lib
)
add_library(projectdraw_core STATIC ${ENGINE_SRC})
set(ENGINE_ROOT "C:/Users/Vincent/Documents/Projects/C++/projectdraw_slim/src/Core/")
foreach(source_item IN ITEMS ${ENGINE_SRC})
get_filename_component(source_item_path "${source_item}" PATH)
file(RELATIVE_PATH source_item_rel_path "${ENGINE_ROOT}" "${source_item_path}")
string(REPLACE "/" "\\" item_group_path "${source_item_rel_path}")
source_group("${item_group_path}" FILES "${source_item}")
endforeach()
target_link_libraries(projectdraw_core
#ASSIMP
debug C:/Users/Vincent/Documents/Projects/Lib/vcpkg/installed/x64-windows/debug/lib/assimp-vc140-mtd.lib
optimized C:/Users/Vincent/Documents/Projects/Lib/vcpkg/installed/x64-windows/lib/assimp-vc140-mt.lib
#GLEW
debug C:/Users/Vincent/Documents/Projects/Lib/vcpkg/installed/x64-windows/debug/lib/glew32d.lib
optimized C:/Users/Vincent/Documents/Projects/Lib/vcpkg/installed/x64-windows/lib/glew32.lib
#OpenGL
#debug C:/Users/Vincent/Documents/Projects/Lib/vcpkg/installed/x64-windows/lib/debug/OpenGL32.lib
#optimized C:/Users/Vincent/Documents/Projects/Lib/vcpkg/installed/x64-windows/lib/OpenGL32.lib
#C:/Program Files (x86)/Windows Kits/10/Lib/10.0.17763.0/um/x64/OpenGL32.lib
#OpenGL32.lib
${OpenGLLibs}
#FreeType
debug C:/Users/Vincent/Documents/Projects/Lib/vcpkg/installed/x64-windows/debug/lib/freetyped.lib
optimized C:/Users/Vincent/Documents/Projects/Lib/vcpkg/installed/x64-windows/lib/freetype.lib
)
include_directories(C:/Users/Vincent/Documents/Projects/C++/projectdraw_slim/src)
find_package(CUDA QUIET REQUIRED)
cuda_add_library(cuda_render STATIC ${CUDARENDER_SRC})
target_link_libraries(cuda_render
debug C:/Users/Vincent/Documents/Projects/C++/projectdraw_slim/build/Debug/projectdraw_core.lib
optimized C:/Users/Vincent/Documents/Projects/C++/projectdraw_slim/build/Release/projectdraw_core.lib
)
add_library(projectdraw_recorder ${RECORDER_SRC})
include_directories(C:/Users/Vincent/Documents/Projects/C++/projectdraw_slim/src)
target_link_libraries(projectdraw_recorder
debug C:/Users/Vincent/Documents/Projects/C++/projectdraw_slim/build/Debug/projectdraw_core.lib
optimized C:/Users/Vincent/Documents/Projects/C++/projectdraw_slim/build/Release/projectdraw_core.lib
#ffmpeg
debug C:/Users/Vincent/Documents/Projects/Lib/vcpkg/installed/x64-windows/lib/debug/avcodec.lib
optimized C:/Users/Vincent/Documents/Projects/Lib/vcpkg/installed/x64-windows/lib/avcodec.lib
)
#Physics Module
add_library(projectdraw_physics3d ${PHYSICS_SRC})
include_directories(
C:/Users/Vincent/Documents/Projects/C++/projectdraw_slim/src
C:/Users/Vincent/Documents/Projects/Lib/C++/bullet3-master/src
)
target_link_libraries(projectdraw_physics3d
debug C:/Users/Vincent/Documents/Projects/C++/projectdraw_slim/build/Debug/projectdraw_core.lib
optimized C:/Users/Vincent/Documents/Projects/C++/projectdraw_slim/build/Release/projectdraw_core.lib
${BulletLibraries}
)
#Examples
#3D Example
include_directories(C:/Users/Vincent/Documents/Projects/Lib/vcpkg/installed/x64-windows/include)
include_directories(C:/Users/Vincent/Documents/Projects/C++/projectdraw_slim/src)
add_executable(example_scene3d ${EXAMPLE_3D_SRC})
target_link_libraries(example_scene3d
#ASSIMP
debug C:/Users/Vincent/Documents/Projects/Lib/vcpkg/installed/x64-windows/debug/lib/assimp-vc140-mtd.lib
optimized C:/Users/Vincent/Documents/Projects/Lib/vcpkg/installed/x64-windows/lib/assimp-vc140-mt.lib
#GLEW
debug C:/Users/Vincent/Documents/Projects/Lib/vcpkg/installed/x64-windows/debug/lib/glew32d.lib
optimized C:/Users/Vincent/Documents/Projects/Lib/vcpkg/installed/x64-windows/lib/glew32.lib
#OpenGL
${OpenGLLibs}
#FreeType
debug C:/Users/Vincent/Documents/Projects/Lib/vcpkg/installed/x64-windows/debug/lib/freetyped.lib
optimized C:/Users/Vincent/Documents/Projects/Lib/vcpkg/installed/x64-windows/lib/freetype.lib
#SFML
debug C:/Users/Vincent/Documents/Projects/Lib/vcpkg/installed/x64-windows/debug/lib/sfml-graphics-d.lib
debug C:/Users/Vincent/Documents/Projects/Lib/vcpkg/installed/x64-windows/debug/lib/sfml-window-d.lib
debug C:/Users/Vincent/Documents/Projects/Lib/vcpkg/installed/x64-windows/debug/lib/sfml-system-d.lib
optimized C:/Users/Vincent/Documents/Projects/Lib/vcpkg/installed/x64-windows/lib/sfml-graphics.lib
optimized C:/Users/Vincent/Documents/Projects/Lib/vcpkg/installed/x64-windows/lib/sfml-window.lib
optimized C:/Users/Vincent/Documents/Projects/Lib/vcpkg/installed/x64-windows/lib/sfml-system.lib
#ProjectDraw
${ProjectDrawLibraries}
)
add_executable(example_physics3d ${EXAMPLE_PHYSICS3D_SRC})
target_include_directories(example_physics3d PUBLIC
C:/Users/Vincent/Documents/Projects/C++/projectdraw_slim/src
C:/Users/Vincent/Documents/Projects/Lib/C++/bullet3-master/src
)
target_link_libraries(example_physics3d
#ASSIMP
debug C:/Users/Vincent/Documents/Projects/Lib/vcpkg/installed/x64-windows/debug/lib/assimp-vc140-mtd.lib
optimized C:/Users/Vincent/Documents/Projects/Lib/vcpkg/installed/x64-windows/lib/assimp-vc140-mt.lib
#GLEW
debug C:/Users/Vincent/Documents/Projects/Lib/vcpkg/installed/x64-windows/debug/lib/glew32d.lib
optimized C:/Users/Vincent/Documents/Projects/Lib/vcpkg/installed/x64-windows/lib/glew32.lib
#OpenGL
${OpenGLLibs}
#FreeType
debug C:/Users/Vincent/Documents/Projects/Lib/vcpkg/installed/x64-windows/debug/lib/freetyped.lib
optimized C:/Users/Vincent/Documents/Projects/Lib/vcpkg/installed/x64-windows/lib/freetype.lib
#SFML
debug C:/Users/Vincent/Documents/Projects/Lib/vcpkg/installed/x64-windows/debug/lib/sfml-graphics-d.lib
debug C:/Users/Vincent/Documents/Projects/Lib/vcpkg/installed/x64-windows/debug/lib/sfml-window-d.lib
debug C:/Users/Vincent/Documents/Projects/Lib/vcpkg/installed/x64-windows/debug/lib/sfml-system-d.lib
optimized C:/Users/Vincent/Documents/Projects/Lib/vcpkg/installed/x64-windows/lib/sfml-graphics.lib
optimized C:/Users/Vincent/Documents/Projects/Lib/vcpkg/installed/x64-windows/lib/sfml-window.lib
optimized C:/Users/Vincent/Documents/Projects/Lib/vcpkg/installed/x64-windows/lib/sfml-system.lib
#ProjectDraw
${ProjectDrawLibraries}
#Bullet
${BulletLibraries}
)
add_executable(experimental_opengl ${EXPERIMENTAL_OPENGL})
target_include_directories(experimental_opengl PUBLIC
C:/Users/Vincent/Documents/Projects/C++/projectdraw_slim/src
C:/Users/Vincent/Documents/Projects/Lib/C++/bullet3-master/src
)
target_link_libraries(experimental_opengl
#ASSIMP
debug C:/Users/Vincent/Documents/Projects/Lib/vcpkg/installed/x64-windows/debug/lib/assimp-vc140-mtd.lib
optimized C:/Users/Vincent/Documents/Projects/Lib/vcpkg/installed/x64-windows/lib/assimp-vc140-mt.lib
#GLEW
debug C:/Users/Vincent/Documents/Projects/Lib/vcpkg/installed/x64-windows/debug/lib/glew32d.lib
optimized C:/Users/Vincent/Documents/Projects/Lib/vcpkg/installed/x64-windows/lib/glew32.lib
#OpenGL
${OpenGLLibs}
#FreeType
debug C:/Users/Vincent/Documents/Projects/Lib/vcpkg/installed/x64-windows/debug/lib/freetyped.lib
optimized C:/Users/Vincent/Documents/Projects/Lib/vcpkg/installed/x64-windows/lib/freetype.lib
#SFML
debug C:/Users/Vincent/Documents/Projects/Lib/vcpkg/installed/x64-windows/debug/lib/sfml-graphics-d.lib
debug C:/Users/Vincent/Documents/Projects/Lib/vcpkg/installed/x64-windows/debug/lib/sfml-window-d.lib
debug C:/Users/Vincent/Documents/Projects/Lib/vcpkg/installed/x64-windows/debug/lib/sfml-system-d.lib
optimized C:/Users/Vincent/Documents/Projects/Lib/vcpkg/installed/x64-windows/lib/sfml-graphics.lib
optimized C:/Users/Vincent/Documents/Projects/Lib/vcpkg/installed/x64-windows/lib/sfml-window.lib
optimized C:/Users/Vincent/Documents/Projects/Lib/vcpkg/installed/x64-windows/lib/sfml-system.lib
#ProjectDraw
${ProjectDrawLibraries}
#Bullet
${BulletLibraries}
)
endif()