|
|
@ -8,6 +8,9 @@ import os |
|
|
|
top = '.' |
|
|
|
top = '.' |
|
|
|
|
|
|
|
|
|
|
|
def options(opt): |
|
|
|
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( |
|
|
|
opt.add_option( |
|
|
|
'--enable-bsp2', action = 'store_true', dest = 'SUPPORT_BSP2_FORMAT', default = False, |
|
|
|
'--enable-bsp2', action = 'store_true', dest = 'SUPPORT_BSP2_FORMAT', default = False, |
|
|
|
help = 'build engine with BSP2 map support(recommended for Quake, breaks compability!)') |
|
|
|
help = 'build engine with BSP2 map support(recommended for Quake, breaks compability!)') |
|
|
@ -29,6 +32,14 @@ def configure(conf): |
|
|
|
msg='Checking for SDL2', |
|
|
|
msg='Checking for SDL2', |
|
|
|
uselib_store='SDL2') |
|
|
|
uselib_store='SDL2') |
|
|
|
except conf.errors.ConfigurationError: |
|
|
|
except conf.errors.ConfigurationError: |
|
|
|
|
|
|
|
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.fatal('SDL2 not availiable! If you want to build dedicated server, specify --dedicated') |
|
|
|
conf.env.append_unique('DEFINES', 'XASH_SDL') |
|
|
|
conf.env.append_unique('DEFINES', 'XASH_SDL') |
|
|
|
|
|
|
|
|
|
|
|