sdl2-config tool
This commit is contained in:
Родитель
0a6134ff45
Коммит
617c947465
|
@ -0,0 +1,13 @@
|
|||
#!/usr/bin/env python2
|
||||
|
||||
import sys
|
||||
|
||||
print >> sys.stderr, 'emscripten sdl2-config called with', ' '.join(sys.argv)
|
||||
|
||||
args = sys.argv[1:]
|
||||
|
||||
if '--cflags' in args or '--libs' in args:
|
||||
print '-s USE_SDL=2'
|
||||
elif '--version' in args:
|
||||
print '2.0.0'
|
||||
|
|
@ -4759,3 +4759,14 @@ Descriptor desc;
|
|||
check('emconfigure', ['./configure'], fail=False)
|
||||
check('emconfigure', ['cmake'], fail=False)
|
||||
|
||||
def test_sdl2_config(self):
|
||||
for args, expected in [
|
||||
[['--version'], '2.0.0'],
|
||||
[['--cflags'], '-s USE_SDL=2'],
|
||||
[['--libs'], '-s USE_SDL=2'],
|
||||
[['--cflags', '--libs'], '-s USE_SDL=2'],
|
||||
]:
|
||||
print args, expected
|
||||
out, err = Popen([PYTHON, path_from_root('system', 'bin', 'sdl2-config')] + args, stdout=PIPE, stderr=PIPE).communicate()
|
||||
assert expected in out, out
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче