1- #! /usr/bin/env python
1+ \ #! /usr/bin/env python
22# encoding: utf-8
33# nillerusr
44
@@ -159,15 +159,17 @@ def define_platform(conf):
159159 conf .env .DEDICATED = conf .options .DEDICATED
160160 conf .env .TESTS = conf .options .TESTS
161161 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
163163 conf .env .OPUS = conf .options .OPUS
164164
165165 if conf .options .DEDICATED :
166166 conf .options .SDL = False
167- # conf.options.GL = False
168167 conf .define ('DEDICATED' , 1 )
169168
170- if conf .options .GL and not conf .options .TESTS :
169+ if conf .options .TESTS :
170+ conf .define ('UNITTESTS' , 1 )
171+
172+ if conf .options .GL :
171173 conf .env .append_unique ('DEFINES' , [
172174 'DX_TO_GL_ABSTRACTION' ,
173175 'GL_GLEXT_PROTOTYPES' ,
@@ -177,6 +179,9 @@ def define_platform(conf):
177179 if conf .options .TOGLES :
178180 conf .env .append_unique ('DEFINES' , ['TOGLES' ])
179181
182+ if conf .options .TESTS :
183+ conf .define ('UNITTESTS' , 1 )
184+
180185 if conf .options .SDL and not conf .options .TESTS :
181186 conf .env .SDL = 1
182187 conf .define ('USE_SDL' , 1 )
@@ -323,6 +328,20 @@ def check_deps(conf):
323328 for i in a :
324329 conf .check_cc (lib = i )
325330
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"
326345
327346 if conf .options .TESTS :
328347 return
@@ -361,21 +380,6 @@ def check_deps(conf):
361380 conf .check (lib = 'android_support' , uselib_store = 'ANDROID_SUPPORT' )
362381 conf .check (lib = 'opus' , uselib_store = 'OPUS' )
363382
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-
379383 if conf .env .DEST_OS == 'win32' :
380384 conf .check (lib = 'libz' , uselib_store = 'ZLIB' , define_name = 'USE_ZLIB' )
381385 # conf.check(lib='nvtc', uselib_store='NVTC')
0 commit comments