From 823e437005e69ad0764b6aa1abe6e4b869d5b94c Mon Sep 17 00:00:00 2001 From: nillerusr Date: Wed, 26 Apr 2023 22:30:28 +0300 Subject: [PATCH] wscript(android,windows): add sdl2 to installation path --- inputsystem/wscript | 11 +---------- wscript | 5 +++++ 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/inputsystem/wscript b/inputsystem/wscript index 9089c72a..252452aa 100755 --- a/inputsystem/wscript +++ b/inputsystem/wscript @@ -43,17 +43,8 @@ def build(bld): if bld.env.DEST_OS == 'win32': libs += ['USER32'] - - install_path = bld.env.LIBDIR - # Copy SDL2 dependency - if bld.env.DEST_OS == 'win32': - bld( - rule=(('cp' if 'MSYSTEM' in os.environ or sys.platform != 'win32' else 'copy')+' ${SRC} ${TGT}'), - source='../lib/win32/'+bld.env.DEST_CPU+'/SDL2.dll', - target='SDL2.dll', - install_path=install_path, - ) + install_path = bld.env.LIBDIR bld.shlib( source = source, diff --git a/wscript b/wscript index f4221618..95871403 100644 --- a/wscript +++ b/wscript @@ -591,6 +591,11 @@ def configure(conf): def build(bld): os.environ["CCACHE_DIR"] = os.path.abspath('.ccache/'+bld.env.COMPILER_CC+'/'+bld.env.DEST_OS+'/'+bld.env.DEST_CPU) + if bld.env.DEST_OS in ['win32', 'android']: + sdl_name = 'SDL2.dll' if bld.env.DEST_OS == 'win32' else 'libSDL2.so' + sdl_path = os.path.join('lib', bld.env.DEST_OS, bld.env.DEST_CPU, sdl_name) + bld.install_files('${PREFIX}/', [sdl_path]) + if bld.env.DEST_OS == 'win32': projects['game'] += ['utils/bzip2'] projects['dedicated'] += ['utils/bzip2']