-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
437 lines (432 loc) · 16 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
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
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
# this is the build file for project
# it is autogenerated by the xmake build system.
# do not edit by hand.
# project
cmake_minimum_required(VERSION 3.15.0)
cmake_policy(SET CMP0091 NEW)
project(breakout LANGUAGES CXX C)
set(CAMKE_CXX_STANDARD 20)
# target
add_executable(breakout "")
set_target_properties(breakout PROPERTIES OUTPUT_NAME "breakout")
set_target_properties(breakout PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/bin")
add_dependencies(breakout m_log)
target_include_directories(breakout PRIVATE
m_log
include
)
target_include_directories(breakout PRIVATE
/home/kali/.xmake/packages/g/glfw/3.3.8/aa037e96cc854680a09e144c4b5c8fe0/include
/home/kali/.xmake/packages/l/libxrandr/1.5.2/7e2234438abe46ef8622215d7dc8f3b9/include
/home/kali/.xmake/packages/l/libxinerama/1.1.5/e539e5b3575342a89c7a931295fe40c5/include
/home/kali/.xmake/packages/l/libxcursor/1.2.1/0732a9883e0c44a2a5e1529e9d2dbe14/include
/home/kali/.xmake/packages/l/libxrender/0.9.11/fac60acfd692409586d9ed6a3c85811e/include
/home/kali/.xmake/packages/l/libxi/1.8/98f0dd4777c3417abf73c89d52845a65/include
/home/kali/.xmake/packages/l/libxfixes/6.0.0/2d757f76f719404da3e722f3d838e427/include
/home/kali/.xmake/packages/l/libxext/1.3.5/1b46f61aed874596b59ab56f3105ce8f/include
/home/kali/.xmake/packages/l/libx11/1.8.1/fd07693527644f3bbb6e10575d66514e/include
/home/kali/.xmake/packages/x/xtrans/1.4.0/576fb3beba324ff6ba8b503904027ceb/include
/home/kali/.xmake/packages/l/libxcb/1.14/db93669a5af1410f8d2bc04e79d40b41/include
/home/kali/.xmake/packages/p/python/3.10.6/e357df3d007a461995be04740991afd2/include/python3.10
/home/kali/.xmake/packages/z/zlib/v1.2.13/6c2566e3272548ea9aa218b4a6537908/include
/home/kali/.xmake/packages/o/openssl/1.1.1-t/25a06d63c5c94540b3812b3f969192cb/include
/home/kali/.xmake/packages/l/libxau/1.0.10/27515214178744588d80b1325d67d716/include
/home/kali/.xmake/packages/l/libxdmcp/1.1.3/78672dd0294d4b21a7041b57aa194c10/include
/home/kali/.xmake/packages/x/xorgproto/2022.2/dd1df992914e46859ea74b411d3b5397/include
/home/kali/.xmake/packages/g/glm/0.9.9+8/65b1ad153bda4a43b0454eba7969327f/include
/home/kali/.xmake/packages/s/stb/2023.01.30/49ce4a7c588e45939363ab41edbf4c09/include
/home/kali/.xmake/packages/s/stb/2023.01.30/49ce4a7c588e45939363ab41edbf4c09/include/stb
/home/kali/.xmake/packages/g/glad/v0.1.36/dd6f7de88060486a93ea896ea2b462ea/include
/home/kali/.xmake/packages/f/fmt/9.1.0/d363b063d73b40728217e45838c2553c/include
)
target_compile_definitions(breakout PRIVATE
PROJECT_ROOT_DIR="/home/kali/toys/cc/GL/LearnOpenGL/practice-breakout-2dgame"
_GLFW_X11
GLFW_INCLUDE_NONE
)
target_compile_options(breakout PRIVATE
$<$<COMPILE_LANGUAGE:C>:-m64>
$<$<COMPILE_LANGUAGE:CXX>:-m64>
)
if(MSVC)
target_compile_options(breakout PRIVATE $<$<CONFIG:Debug>:-Od>)
else()
target_compile_options(breakout PRIVATE -O0)
endif()
if(MSVC)
target_compile_options(breakout PRIVATE -Zi)
else()
target_compile_options(breakout PRIVATE -g)
endif()
if(MSVC)
set_property(TARGET breakout PROPERTY
MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
endif()
target_link_libraries(breakout PRIVATE
glfw3
OpenGL
Xrandr
Xinerama
Xcursor
Xrender
Xi
Xfixes
Xext
X11-xcb
X11
xcb-render
xcb-xinerama
xcb-record
xcb-glx
xcb-xvmc
xcb-present
xcb-res
xcb-randr
xcb-shm
xcb-xtest
xcb-xf86dri
xcb-xv
xcb-shape
xcb-ge
xcb-dri3
xcb-xinput
xcb-dpms
xcb-screensaver
xcb-dri2
xcb-xkb
xcb-xevie
xcb-xfixes
xcb-damage
xcb-composite
xcb-sync
xcb
python3.10
ffi
z
ssl
crypto
Xau
Xdmcp
glad
fmt
m_log
dl
pthread
util
)
target_link_directories(breakout PRIVATE
/home/kali/.xmake/packages/g/glfw/3.3.8/aa037e96cc854680a09e144c4b5c8fe0/lib
/usr/lib/x86_64-linux-gnu
/home/kali/.xmake/packages/l/libxrandr/1.5.2/7e2234438abe46ef8622215d7dc8f3b9/lib
/home/kali/.xmake/packages/l/libxinerama/1.1.5/e539e5b3575342a89c7a931295fe40c5/lib
/home/kali/.xmake/packages/l/libxcursor/1.2.1/0732a9883e0c44a2a5e1529e9d2dbe14/lib
/home/kali/.xmake/packages/l/libxrender/0.9.11/fac60acfd692409586d9ed6a3c85811e/lib
/home/kali/.xmake/packages/l/libxi/1.8/98f0dd4777c3417abf73c89d52845a65/lib
/home/kali/.xmake/packages/l/libxfixes/6.0.0/2d757f76f719404da3e722f3d838e427/lib
/home/kali/.xmake/packages/l/libxext/1.3.5/1b46f61aed874596b59ab56f3105ce8f/lib
/home/kali/.xmake/packages/l/libx11/1.8.1/fd07693527644f3bbb6e10575d66514e/lib
/home/kali/.xmake/packages/l/libxcb/1.14/db93669a5af1410f8d2bc04e79d40b41/lib
/home/kali/.xmake/packages/p/python/3.10.6/e357df3d007a461995be04740991afd2/lib
/home/kali/.xmake/packages/z/zlib/v1.2.13/6c2566e3272548ea9aa218b4a6537908/lib
/home/kali/.xmake/packages/o/openssl/1.1.1-t/25a06d63c5c94540b3812b3f969192cb/lib
/home/kali/.xmake/packages/l/libxau/1.0.10/27515214178744588d80b1325d67d716/lib
/home/kali/.xmake/packages/l/libxdmcp/1.1.3/78672dd0294d4b21a7041b57aa194c10/lib
/home/kali/.xmake/packages/g/glad/v0.1.36/dd6f7de88060486a93ea896ea2b462ea/lib
/home/kali/.xmake/packages/f/fmt/9.1.0/d363b063d73b40728217e45838c2553c/lib
bin
)
target_link_options(breakout PRIVATE
-m64
)
target_sources(breakout PRIVATE
src/obj/ball_object.cpp
src/obj/game_object.cpp
src/game_level.cpp
src/game.cpp
src/resource_manager/shader.cpp
src/resource_manager/texture.cpp
src/resource_manager/resource_manager.cpp
src/main.cpp
)
# target
add_library(m_log SHARED "")
set_target_properties(m_log PROPERTIES OUTPUT_NAME "m_log")
set_target_properties(m_log PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/bin")
target_include_directories(m_log PRIVATE
m_log
)
target_include_directories(m_log PRIVATE
/home/kali/.xmake/packages/g/glfw/3.3.8/aa037e96cc854680a09e144c4b5c8fe0/include
/home/kali/.xmake/packages/l/libxrandr/1.5.2/7e2234438abe46ef8622215d7dc8f3b9/include
/home/kali/.xmake/packages/l/libxinerama/1.1.5/e539e5b3575342a89c7a931295fe40c5/include
/home/kali/.xmake/packages/l/libxcursor/1.2.1/0732a9883e0c44a2a5e1529e9d2dbe14/include
/home/kali/.xmake/packages/l/libxrender/0.9.11/fac60acfd692409586d9ed6a3c85811e/include
/home/kali/.xmake/packages/l/libxi/1.8/98f0dd4777c3417abf73c89d52845a65/include
/home/kali/.xmake/packages/l/libxfixes/6.0.0/2d757f76f719404da3e722f3d838e427/include
/home/kali/.xmake/packages/l/libxext/1.3.5/1b46f61aed874596b59ab56f3105ce8f/include
/home/kali/.xmake/packages/l/libx11/1.8.1/fd07693527644f3bbb6e10575d66514e/include
/home/kali/.xmake/packages/x/xtrans/1.4.0/576fb3beba324ff6ba8b503904027ceb/include
/home/kali/.xmake/packages/l/libxcb/1.14/db93669a5af1410f8d2bc04e79d40b41/include
/home/kali/.xmake/packages/p/python/3.10.6/e357df3d007a461995be04740991afd2/include/python3.10
/home/kali/.xmake/packages/z/zlib/v1.2.13/6c2566e3272548ea9aa218b4a6537908/include
/home/kali/.xmake/packages/o/openssl/1.1.1-t/25a06d63c5c94540b3812b3f969192cb/include
/home/kali/.xmake/packages/l/libxau/1.0.10/27515214178744588d80b1325d67d716/include
/home/kali/.xmake/packages/l/libxdmcp/1.1.3/78672dd0294d4b21a7041b57aa194c10/include
/home/kali/.xmake/packages/x/xorgproto/2022.2/dd1df992914e46859ea74b411d3b5397/include
/home/kali/.xmake/packages/g/glm/0.9.9+8/65b1ad153bda4a43b0454eba7969327f/include
/home/kali/.xmake/packages/s/stb/2023.01.30/49ce4a7c588e45939363ab41edbf4c09/include
/home/kali/.xmake/packages/s/stb/2023.01.30/49ce4a7c588e45939363ab41edbf4c09/include/stb
/home/kali/.xmake/packages/g/glad/v0.1.36/dd6f7de88060486a93ea896ea2b462ea/include
/home/kali/.xmake/packages/f/fmt/9.1.0/d363b063d73b40728217e45838c2553c/include
)
target_compile_definitions(m_log PRIVATE
PROJECT_ROOT_DIR="/home/kali/toys/cc/GL/LearnOpenGL/practice-breakout-2dgame"
_GLFW_X11
GLFW_INCLUDE_NONE
)
target_compile_options(m_log PRIVATE
$<$<COMPILE_LANGUAGE:C>:-m64>
$<$<COMPILE_LANGUAGE:CXX>:-m64>
$<$<COMPILE_LANGUAGE:C>:-fPIC>
$<$<COMPILE_LANGUAGE:CXX>:-fPIC>
)
if(MSVC)
target_compile_options(m_log PRIVATE $<$<CONFIG:Debug>:-Od>)
else()
target_compile_options(m_log PRIVATE -O0)
endif()
if(MSVC)
target_compile_options(m_log PRIVATE -Zi)
else()
target_compile_options(m_log PRIVATE -g)
endif()
if(MSVC)
set_property(TARGET m_log PROPERTY
MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
endif()
target_link_libraries(m_log PRIVATE
glfw3
OpenGL
Xrandr
Xinerama
Xcursor
Xrender
Xi
Xfixes
Xext
X11-xcb
X11
xcb-render
xcb-xinerama
xcb-record
xcb-glx
xcb-xvmc
xcb-present
xcb-res
xcb-randr
xcb-shm
xcb-xtest
xcb-xf86dri
xcb-xv
xcb-shape
xcb-ge
xcb-dri3
xcb-xinput
xcb-dpms
xcb-screensaver
xcb-dri2
xcb-xkb
xcb-xevie
xcb-xfixes
xcb-damage
xcb-composite
xcb-sync
xcb
python3.10
ffi
z
ssl
crypto
Xau
Xdmcp
glad
fmt
dl
pthread
util
)
target_link_directories(m_log PRIVATE
/home/kali/.xmake/packages/g/glfw/3.3.8/aa037e96cc854680a09e144c4b5c8fe0/lib
/usr/lib/x86_64-linux-gnu
/home/kali/.xmake/packages/l/libxrandr/1.5.2/7e2234438abe46ef8622215d7dc8f3b9/lib
/home/kali/.xmake/packages/l/libxinerama/1.1.5/e539e5b3575342a89c7a931295fe40c5/lib
/home/kali/.xmake/packages/l/libxcursor/1.2.1/0732a9883e0c44a2a5e1529e9d2dbe14/lib
/home/kali/.xmake/packages/l/libxrender/0.9.11/fac60acfd692409586d9ed6a3c85811e/lib
/home/kali/.xmake/packages/l/libxi/1.8/98f0dd4777c3417abf73c89d52845a65/lib
/home/kali/.xmake/packages/l/libxfixes/6.0.0/2d757f76f719404da3e722f3d838e427/lib
/home/kali/.xmake/packages/l/libxext/1.3.5/1b46f61aed874596b59ab56f3105ce8f/lib
/home/kali/.xmake/packages/l/libx11/1.8.1/fd07693527644f3bbb6e10575d66514e/lib
/home/kali/.xmake/packages/l/libxcb/1.14/db93669a5af1410f8d2bc04e79d40b41/lib
/home/kali/.xmake/packages/p/python/3.10.6/e357df3d007a461995be04740991afd2/lib
/home/kali/.xmake/packages/z/zlib/v1.2.13/6c2566e3272548ea9aa218b4a6537908/lib
/home/kali/.xmake/packages/o/openssl/1.1.1-t/25a06d63c5c94540b3812b3f969192cb/lib
/home/kali/.xmake/packages/l/libxau/1.0.10/27515214178744588d80b1325d67d716/lib
/home/kali/.xmake/packages/l/libxdmcp/1.1.3/78672dd0294d4b21a7041b57aa194c10/lib
/home/kali/.xmake/packages/g/glad/v0.1.36/dd6f7de88060486a93ea896ea2b462ea/lib
/home/kali/.xmake/packages/f/fmt/9.1.0/d363b063d73b40728217e45838c2553c/lib
)
target_link_options(m_log PRIVATE
-m64
)
target_sources(m_log PRIVATE
m_log/log.cpp
m_log/level.h
m_log/log.h
m_log/microshit_api_log.h
)
# target
add_executable(test "")
set_target_properties(test PROPERTIES OUTPUT_NAME "test")
set_target_properties(test PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/bin")
add_dependencies(test m_log)
target_include_directories(test PRIVATE
m_log
src
include
)
target_include_directories(test PRIVATE
/home/kali/.xmake/packages/g/glfw/3.3.8/aa037e96cc854680a09e144c4b5c8fe0/include
/home/kali/.xmake/packages/l/libxrandr/1.5.2/7e2234438abe46ef8622215d7dc8f3b9/include
/home/kali/.xmake/packages/l/libxinerama/1.1.5/e539e5b3575342a89c7a931295fe40c5/include
/home/kali/.xmake/packages/l/libxcursor/1.2.1/0732a9883e0c44a2a5e1529e9d2dbe14/include
/home/kali/.xmake/packages/l/libxrender/0.9.11/fac60acfd692409586d9ed6a3c85811e/include
/home/kali/.xmake/packages/l/libxi/1.8/98f0dd4777c3417abf73c89d52845a65/include
/home/kali/.xmake/packages/l/libxfixes/6.0.0/2d757f76f719404da3e722f3d838e427/include
/home/kali/.xmake/packages/l/libxext/1.3.5/1b46f61aed874596b59ab56f3105ce8f/include
/home/kali/.xmake/packages/l/libx11/1.8.1/fd07693527644f3bbb6e10575d66514e/include
/home/kali/.xmake/packages/x/xtrans/1.4.0/576fb3beba324ff6ba8b503904027ceb/include
/home/kali/.xmake/packages/l/libxcb/1.14/db93669a5af1410f8d2bc04e79d40b41/include
/home/kali/.xmake/packages/p/python/3.10.6/e357df3d007a461995be04740991afd2/include/python3.10
/home/kali/.xmake/packages/z/zlib/v1.2.13/6c2566e3272548ea9aa218b4a6537908/include
/home/kali/.xmake/packages/o/openssl/1.1.1-t/25a06d63c5c94540b3812b3f969192cb/include
/home/kali/.xmake/packages/l/libxau/1.0.10/27515214178744588d80b1325d67d716/include
/home/kali/.xmake/packages/l/libxdmcp/1.1.3/78672dd0294d4b21a7041b57aa194c10/include
/home/kali/.xmake/packages/x/xorgproto/2022.2/dd1df992914e46859ea74b411d3b5397/include
/home/kali/.xmake/packages/g/glm/0.9.9+8/65b1ad153bda4a43b0454eba7969327f/include
/home/kali/.xmake/packages/s/stb/2023.01.30/49ce4a7c588e45939363ab41edbf4c09/include
/home/kali/.xmake/packages/s/stb/2023.01.30/49ce4a7c588e45939363ab41edbf4c09/include/stb
/home/kali/.xmake/packages/g/glad/v0.1.36/dd6f7de88060486a93ea896ea2b462ea/include
/home/kali/.xmake/packages/f/fmt/9.1.0/d363b063d73b40728217e45838c2553c/include
/home/kali/.xmake/packages/g/gtest/1.12.1/77b9096bc4b34d9282f672d36b015ba9/include
)
target_compile_definitions(test PRIVATE
PROJECT_ROOT_DIR="/home/kali/toys/cc/GL/LearnOpenGL/practice-breakout-2dgame"
DISABLE_TEST_CASE
_GLFW_X11
GLFW_INCLUDE_NONE
)
target_compile_options(test PRIVATE
$<$<COMPILE_LANGUAGE:C>:-m64>
$<$<COMPILE_LANGUAGE:CXX>:-m64>
)
if(MSVC)
target_compile_options(test PRIVATE $<$<CONFIG:Debug>:-Od>)
else()
target_compile_options(test PRIVATE -O0)
endif()
if(MSVC)
target_compile_options(test PRIVATE -Zi)
else()
target_compile_options(test PRIVATE -g)
endif()
if(MSVC)
set_property(TARGET test PROPERTY
MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
endif()
target_link_libraries(test PRIVATE
glfw3
OpenGL
Xrandr
Xinerama
Xcursor
Xrender
Xi
Xfixes
Xext
X11-xcb
X11
xcb-render
xcb-xinerama
xcb-record
xcb-glx
xcb-xvmc
xcb-present
xcb-res
xcb-randr
xcb-shm
xcb-xtest
xcb-xf86dri
xcb-xv
xcb-shape
xcb-ge
xcb-dri3
xcb-xinput
xcb-dpms
xcb-screensaver
xcb-dri2
xcb-xkb
xcb-xevie
xcb-xfixes
xcb-damage
xcb-composite
xcb-sync
xcb
python3.10
ffi
z
ssl
crypto
Xau
Xdmcp
glad
fmt
gtest_main
gtest
gmock
m_log
dl
pthread
util
)
target_link_directories(test PRIVATE
/home/kali/.xmake/packages/g/glfw/3.3.8/aa037e96cc854680a09e144c4b5c8fe0/lib
/usr/lib/x86_64-linux-gnu
/home/kali/.xmake/packages/l/libxrandr/1.5.2/7e2234438abe46ef8622215d7dc8f3b9/lib
/home/kali/.xmake/packages/l/libxinerama/1.1.5/e539e5b3575342a89c7a931295fe40c5/lib
/home/kali/.xmake/packages/l/libxcursor/1.2.1/0732a9883e0c44a2a5e1529e9d2dbe14/lib
/home/kali/.xmake/packages/l/libxrender/0.9.11/fac60acfd692409586d9ed6a3c85811e/lib
/home/kali/.xmake/packages/l/libxi/1.8/98f0dd4777c3417abf73c89d52845a65/lib
/home/kali/.xmake/packages/l/libxfixes/6.0.0/2d757f76f719404da3e722f3d838e427/lib
/home/kali/.xmake/packages/l/libxext/1.3.5/1b46f61aed874596b59ab56f3105ce8f/lib
/home/kali/.xmake/packages/l/libx11/1.8.1/fd07693527644f3bbb6e10575d66514e/lib
/home/kali/.xmake/packages/l/libxcb/1.14/db93669a5af1410f8d2bc04e79d40b41/lib
/home/kali/.xmake/packages/p/python/3.10.6/e357df3d007a461995be04740991afd2/lib
/home/kali/.xmake/packages/z/zlib/v1.2.13/6c2566e3272548ea9aa218b4a6537908/lib
/home/kali/.xmake/packages/o/openssl/1.1.1-t/25a06d63c5c94540b3812b3f969192cb/lib
/home/kali/.xmake/packages/l/libxau/1.0.10/27515214178744588d80b1325d67d716/lib
/home/kali/.xmake/packages/l/libxdmcp/1.1.3/78672dd0294d4b21a7041b57aa194c10/lib
/home/kali/.xmake/packages/g/glad/v0.1.36/dd6f7de88060486a93ea896ea2b462ea/lib
/home/kali/.xmake/packages/f/fmt/9.1.0/d363b063d73b40728217e45838c2553c/lib
/home/kali/.xmake/packages/g/gtest/1.12.1/77b9096bc4b34d9282f672d36b015ba9/lib
bin
)
target_link_options(test PRIVATE
-m64
)
target_sources(test PRIVATE
test/main.cpp
test/path.cc
test/destruct.cc
test/log.cc
test/load_level_test.cc
)