wscript: fix SDL2 include path

This commit is contained in:
Alibek Omarov 2018-11-18 22:48:52 +03:00
parent d3c310628f
commit 7b806add63

View File

@ -32,13 +32,16 @@ def configure(conf):
if(conf.options.SDL2_PATH):
conf.start_msg('Configuring SDL2 by provided path')
conf.env.HAVE_SDL2 = 1
conf.env.INCLUDES_SDL2 = [os.path.abspath(os.path.join(conf.options.SDL2_PATH, 'include'))]
conf.env.INCLUDES_SDL2 = [
os.path.abspath(os.path.join(conf.options.SDL2_PATH, 'include')),
os.path.abspath(os.path.join(conf.options.SDL2_PATH, 'include/SDL'))
]
libpath = 'lib'
if(conf.env.COMPILER_CC == 'msvc'):
libpath = 'lib/x86'
conf.env.LIBPATH_SDL2 = [os.path.abspath(os.path.join(conf.options.SDL2_PATH, libpath))]
conf.env.LIB_SDL2 = ['SDL2']
conf.end_msg('ok')
conf.end_msg('yes: {0}, {1}, {2}'.format(conf.env.LIB_SDL2, conf.env.LIBPATH_SDL2, conf.env.INCLUDES_SDL2))
else:
conf.fatal('SDL2 not availiable! If you want to build dedicated server, specify --dedicated')
conf.env.append_unique('DEFINES', 'XASH_SDL')