|
|
|
@ -8,6 +8,9 @@ import os
@@ -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):
@@ -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): |
|
|
|
|