wscript: fix win32 build

This commit is contained in:
Alibek Omarov
2018-10-08 22:27:54 +03:00
parent 48d1aa5115
commit 8ea5536b42
4 changed files with 18 additions and 4 deletions

View File

@@ -8,6 +8,9 @@ import os
top = '.'
def options(opt):
opt.add_option(
'--sdl2', action='store', type='string', dest = 'SDL2_PATH', default = None,
help = 'SDL2 path to build(required for Windows)')
opt.add_option(
'--enable-bsp2', action = 'store_true', dest = 'SUPPORT_BSP2_FORMAT', default = False,
help = 'build engine with BSP2 map support(recommended for Quake, breaks compability!)')
@@ -29,7 +32,15 @@ def configure(conf):
msg='Checking for SDL2',
uselib_store='SDL2')
except conf.errors.ConfigurationError:
conf.fatal('SDL2 not availiable! If you want to build dedicated server, specify --dedicated')
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.LIBPATH_SDL2 = [os.path.abspath(os.path.join(conf.options.SDL2_PATH, 'lib/x86'))]
conf.env.LIB_SDL2 = ['SDL2']
conf.end_msg('ok')
else:
conf.fatal('SDL2 not availiable! If you want to build dedicated server, specify --dedicated')
conf.env.append_unique('DEFINES', 'XASH_SDL')
if(conf.options.SUPPORT_BSP2_FORMAT):