Skip to content

Commit 136b9dd

Browse files
committed
Don't compile anything in SDL3
1 parent 0b5ea9a commit 136b9dd

File tree

1 file changed

+97
-0
lines changed

1 file changed

+97
-0
lines changed

src_c/meson.build

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
# first the "required" modules
2+
3+
# TODO: support SDL3
4+
if sdl_api != 3
25
base = py.extension_module(
36
'base',
47
'base.c',
@@ -7,7 +10,10 @@ base = py.extension_module(
710
install: true,
811
subdir: pg,
912
)
13+
endif
1014

15+
# TODO: support SDL3
16+
if sdl_api != 3
1117
color = py.extension_module(
1218
'color',
1319
'color.c',
@@ -16,7 +22,10 @@ color = py.extension_module(
1622
install: true,
1723
subdir: pg,
1824
)
25+
endif
1926

27+
# TODO: support SDL3
28+
if sdl_api != 3
2029
constants = py.extension_module(
2130
'constants',
2231
'constants.c',
@@ -25,7 +34,10 @@ constants = py.extension_module(
2534
install: true,
2635
subdir: pg,
2736
)
37+
endif
2838

39+
# TODO: support SDL3
40+
if sdl_api != 3
2941
display = py.extension_module(
3042
'display',
3143
'display.c',
@@ -34,7 +46,10 @@ display = py.extension_module(
3446
install: true,
3547
subdir: pg,
3648
)
49+
endif
3750

51+
# TODO: support SDL3
52+
if sdl_api != 3
3853
event = py.extension_module(
3954
'event',
4055
'event.c',
@@ -43,7 +58,10 @@ event = py.extension_module(
4358
install: true,
4459
subdir: pg,
4560
)
61+
endif
4662

63+
# TODO: support SDL3
64+
if sdl_api != 3
4765
key = py.extension_module(
4866
'key',
4967
'key.c',
@@ -52,7 +70,10 @@ key = py.extension_module(
5270
install: true,
5371
subdir: pg,
5472
)
73+
endif
5574

75+
# TODO: support SDL3
76+
if sdl_api != 3
5677
mouse = py.extension_module(
5778
'mouse',
5879
'mouse.c',
@@ -61,7 +82,10 @@ mouse = py.extension_module(
6182
install: true,
6283
subdir: pg,
6384
)
85+
endif
6486

87+
# TODO: support SDL3
88+
if sdl_api != 3
6589
rect = py.extension_module(
6690
'rect',
6791
['rect.c', 'pgcompat_rect.c'],
@@ -70,7 +94,10 @@ rect = py.extension_module(
7094
install: true,
7195
subdir: pg,
7296
)
97+
endif
7398

99+
# TODO: support SDL3
100+
if sdl_api != 3
74101
rwobject = py.extension_module(
75102
'rwobject',
76103
'rwobject.c',
@@ -79,7 +106,10 @@ rwobject = py.extension_module(
79106
install: true,
80107
subdir: pg,
81108
)
109+
endif
82110

111+
# TODO: support SDL3
112+
if sdl_api != 3
83113
simd_blitters_avx2 = static_library(
84114
'simd_blitters_avx2',
85115
'simd_blitters_avx2.c',
@@ -126,7 +156,10 @@ surface = py.extension_module(
126156
install: true,
127157
subdir: pg,
128158
)
159+
endif
129160

161+
# TODO: support SDL3
162+
if sdl_api != 3
130163
surflock = py.extension_module(
131164
'surflock',
132165
'surflock.c',
@@ -135,7 +168,10 @@ surflock = py.extension_module(
135168
install: true,
136169
subdir: pg,
137170
)
171+
endif
138172

173+
# TODO: support SDL3
174+
if sdl_api != 3
139175
time = py.extension_module(
140176
'time',
141177
'time.c',
@@ -144,7 +180,10 @@ time = py.extension_module(
144180
install: true,
145181
subdir: pg,
146182
)
183+
endif
147184

185+
# TODO: support SDL3
186+
if sdl_api != 3
148187
joystick = py.extension_module(
149188
'joystick',
150189
'joystick.c',
@@ -153,7 +192,11 @@ joystick = py.extension_module(
153192
install: true,
154193
subdir: pg,
155194
)
195+
endif
196+
156197

198+
# TODO: support SDL3
199+
if sdl_api != 3
157200
draw = py.extension_module(
158201
'draw',
159202
'draw.c',
@@ -162,7 +205,10 @@ draw = py.extension_module(
162205
install: true,
163206
subdir: pg,
164207
)
208+
endif
165209

210+
# TODO: support SDL3
211+
if sdl_api != 3
166212
image = py.extension_module(
167213
'image',
168214
'image.c',
@@ -171,7 +217,10 @@ image = py.extension_module(
171217
install: true,
172218
subdir: pg,
173219
)
220+
endif
174221

222+
# TODO: support SDL3
223+
if sdl_api != 3
175224
simd_transform_avx2 = static_library(
176225
'simd_transform_avx2',
177226
'simd_transform_avx2.c',
@@ -212,7 +261,10 @@ transform = py.extension_module(
212261
install: true,
213262
subdir: pg,
214263
)
264+
endif
215265

266+
# TODO: support SDL3
267+
if sdl_api != 3
216268
mask = py.extension_module(
217269
'mask',
218270
['mask.c', 'bitmask.c'],
@@ -221,7 +273,10 @@ mask = py.extension_module(
221273
install: true,
222274
subdir: pg,
223275
)
276+
endif
224277

278+
# TODO: support SDL3
279+
if sdl_api != 3
225280
bufferproxy = py.extension_module(
226281
'bufferproxy',
227282
'bufferproxy.c',
@@ -230,7 +285,10 @@ bufferproxy = py.extension_module(
230285
install: true,
231286
subdir: pg,
232287
)
288+
endif
233289

290+
# TODO: support SDL3
291+
if sdl_api != 3
234292
pixelarray = py.extension_module(
235293
'pixelarray',
236294
'pixelarray.c',
@@ -239,7 +297,10 @@ pixelarray = py.extension_module(
239297
install: true,
240298
subdir: pg,
241299
)
300+
endif
242301

302+
# TODO: support SDL3
303+
if sdl_api != 3
243304
math = py.extension_module(
244305
'math',
245306
'math.c',
@@ -248,7 +309,10 @@ math = py.extension_module(
248309
install: true,
249310
subdir: pg,
250311
)
312+
endif
251313

314+
# TODO: support SDL3
315+
if sdl_api != 3
252316
pixelcopy = py.extension_module(
253317
'pixelcopy',
254318
'pixelcopy.c',
@@ -257,7 +321,10 @@ pixelcopy = py.extension_module(
257321
install: true,
258322
subdir: pg,
259323
)
324+
endif
260325

326+
# TODO: support SDL3
327+
if sdl_api != 3
261328
newbuffer = py.extension_module(
262329
'newbuffer',
263330
'newbuffer.c',
@@ -266,8 +333,11 @@ newbuffer = py.extension_module(
266333
install: true,
267334
subdir: pg,
268335
)
336+
endif
269337

270338
# new/experimental/uncommon stuff, but built by default
339+
# TODO: support SDL3
340+
if sdl_api != 3
271341
system = py.extension_module(
272342
'system',
273343
'system.c',
@@ -276,7 +346,10 @@ system = py.extension_module(
276346
install: true,
277347
subdir: pg,
278348
)
349+
endif
279350

351+
# TODO: support SDL3
352+
if sdl_api != 3
280353
geometry = py.extension_module(
281354
'geometry',
282355
'geometry.c',
@@ -285,7 +358,10 @@ geometry = py.extension_module(
285358
install: true,
286359
subdir: pg,
287360
)
361+
endif
288362

363+
# TODO: support SDL3
364+
if sdl_api != 3
289365
window = py.extension_module(
290366
'window',
291367
'window.c',
@@ -294,7 +370,10 @@ window = py.extension_module(
294370
install: true,
295371
subdir: pg,
296372
)
373+
endif
297374

375+
# TODO: support SDL3
376+
if sdl_api != 3
298377
gfxdraw = py.extension_module(
299378
'gfxdraw',
300379
['gfxdraw.c', 'SDL_gfx/SDL_gfxPrimitives.c'],
@@ -303,11 +382,18 @@ gfxdraw = py.extension_module(
303382
install: true,
304383
subdir: pg,
305384
)
385+
endif
306386

307387
# pygame._sdl2
388+
# TODO: support SDL3
389+
if sdl_api != 3
308390
subdir('_sdl2')
391+
endif
309392

310393
# pygame._camera
394+
395+
# TODO: support SDL3
396+
if sdl_api != 3
311397
pg_camera_sources = ['_camera.c']
312398
pg_camera_link = []
313399
if plat == 'win'
@@ -338,8 +424,12 @@ _camera = py.extension_module(
338424
install: true,
339425
subdir: pg,
340426
)
427+
endif
341428

342429
# pygame.scrap
430+
431+
# TODO: support SDL3
432+
if sdl_api != 3
343433
pg_scrap_link = [] # TODO: should this link logic be improved/made meson-ey?
344434
if plat == 'win'
345435
pg_scrap_link += ['-luser32', '-lgdi32']
@@ -354,8 +444,13 @@ scrap = py.extension_module(
354444
install: true,
355445
subdir: pg,
356446
)
447+
endif
357448

358449
# optional modules
450+
451+
# TODO: support SDL3
452+
if sdl_api != 3
453+
359454
if sdl_image_dep.found()
360455
imageext = py.extension_module(
361456
'imageext',
@@ -417,6 +512,8 @@ if freetype_dep.found()
417512
)
418513
endif
419514

515+
endif
516+
420517
if portmidi_dep.found()
421518
pypm = py.extension_module(
422519
'pypm',

0 commit comments

Comments
 (0)