@@ -159,15 +159,17 @@ def define_platform(conf):
159
159
conf .env .DEDICATED = conf .options .DEDICATED
160
160
conf .env .TESTS = conf .options .TESTS
161
161
conf .env .TOGLES = conf .options .TOGLES
162
- conf .env .GL = conf .options .GL
162
+ conf .env .GL = conf .options .GL and not conf . options . TESTS and not conf . options . DEDICATED
163
163
conf .env .OPUS = conf .options .OPUS
164
164
165
165
if conf .options .DEDICATED :
166
166
conf .options .SDL = False
167
- # conf.options.GL = False
168
167
conf .define ('DEDICATED' , 1 )
169
168
170
- if conf .options .GL and not conf .options .TESTS :
169
+ if conf .options .TESTS :
170
+ conf .define ('UNITTESTS' , 1 )
171
+
172
+ if conf .env .GL :
171
173
conf .env .append_unique ('DEFINES' , [
172
174
'DX_TO_GL_ABSTRACTION' ,
173
175
'GL_GLEXT_PROTOTYPES' ,
@@ -177,6 +179,9 @@ def define_platform(conf):
177
179
if conf .options .TOGLES :
178
180
conf .env .append_unique ('DEFINES' , ['TOGLES' ])
179
181
182
+ if conf .options .TESTS :
183
+ conf .define ('UNITTESTS' , 1 )
184
+
180
185
if conf .options .SDL and not conf .options .TESTS :
181
186
conf .env .SDL = 1
182
187
conf .define ('USE_SDL' , 1 )
@@ -323,6 +328,20 @@ def check_deps(conf):
323
328
for i in a :
324
329
conf .check_cc (lib = i )
325
330
331
+ if conf .env .DEST_OS == "darwin" :
332
+ conf .check (lib = 'iconv' , uselib_store = 'ICONV' )
333
+ conf .env .FRAMEWORK_APPKIT = "AppKit"
334
+ conf .env .FRAMEWORK_IOKIT = "IOKit"
335
+ conf .env .FRAMEWORK_FOUNDATION = "Foundation"
336
+ conf .env .FRAMEWORK_COREFOUNDATION = "CoreFoundation"
337
+ conf .env .FRAMEWORK_COREGRAPHICS = "CoreGraphics"
338
+ conf .env .FRAMEWORK_OPENGL = "OpenGL"
339
+ conf .env .FRAMEWORK_CARBON = "Carbon"
340
+ conf .env .FRAMEWORK_APPLICATIONSERVICES = "ApplicationServices"
341
+ conf .env .FRAMEWORK_CORESERVICES = "CoreServices"
342
+ conf .env .FRAMEWORK_COREAUDIO = "CoreAudio"
343
+ conf .env .FRAMEWORK_AUDIOTOOLBOX = "AudioToolbox"
344
+ conf .env .FRAMEWORK_SYSTEMCONFIGURATION = "SystemConfiguration"
326
345
327
346
if conf .options .TESTS :
328
347
return
@@ -361,21 +380,6 @@ def check_deps(conf):
361
380
conf .check (lib = 'android_support' , uselib_store = 'ANDROID_SUPPORT' )
362
381
conf .check (lib = 'opus' , uselib_store = 'OPUS' )
363
382
364
- if conf .env .DEST_OS == "darwin" :
365
- conf .check (lib = 'iconv' , uselib_store = 'ICONV' )
366
- conf .env .FRAMEWORK_APPKIT = "AppKit"
367
- conf .env .FRAMEWORK_IOKIT = "IOKit"
368
- conf .env .FRAMEWORK_FOUNDATION = "Foundation"
369
- conf .env .FRAMEWORK_COREFOUNDATION = "CoreFoundation"
370
- conf .env .FRAMEWORK_COREGRAPHICS = "CoreGraphics"
371
- conf .env .FRAMEWORK_OPENGL = "OpenGL"
372
- conf .env .FRAMEWORK_CARBON = "Carbon"
373
- conf .env .FRAMEWORK_APPLICATIONSERVICES = "ApplicationServices"
374
- conf .env .FRAMEWORK_CORESERVICES = "CoreServices"
375
- conf .env .FRAMEWORK_COREAUDIO = "CoreAudio"
376
- conf .env .FRAMEWORK_AUDIOTOOLBOX = "AudioToolbox"
377
- conf .env .FRAMEWORK_SYSTEMCONFIGURATION = "SystemConfiguration"
378
-
379
383
if conf .env .DEST_OS == 'win32' :
380
384
conf .check (lib = 'libz' , uselib_store = 'ZLIB' , define_name = 'USE_ZLIB' )
381
385
# conf.check(lib='nvtc', uselib_store='NVTC')
0 commit comments