mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-07 04:40:43 +08:00
wscript: fix win32 build
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user