Browse Source

wscript: fix SDL2 include path

pull/2/head
Alibek Omarov 6 years ago
parent
commit
7b806add63
  1. 7
      engine/wscript

7
engine/wscript

@ -32,13 +32,16 @@ def configure(conf):
if(conf.options.SDL2_PATH): if(conf.options.SDL2_PATH):
conf.start_msg('Configuring SDL2 by provided path') conf.start_msg('Configuring SDL2 by provided path')
conf.env.HAVE_SDL2 = 1 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' libpath = 'lib'
if(conf.env.COMPILER_CC == 'msvc'): if(conf.env.COMPILER_CC == 'msvc'):
libpath = 'lib/x86' libpath = 'lib/x86'
conf.env.LIBPATH_SDL2 = [os.path.abspath(os.path.join(conf.options.SDL2_PATH, libpath))] conf.env.LIBPATH_SDL2 = [os.path.abspath(os.path.join(conf.options.SDL2_PATH, libpath))]
conf.env.LIB_SDL2 = ['SDL2'] 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: 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')

Loading…
Cancel
Save