Skip to content

Commit 823e437

Browse files
committed
wscript(android,windows): add sdl2 to installation path
1 parent a631383 commit 823e437

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

inputsystem/wscript

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,17 +43,8 @@ def build(bld):
4343

4444
if bld.env.DEST_OS == 'win32':
4545
libs += ['USER32']
46-
47-
install_path = bld.env.LIBDIR
4846

49-
# Copy SDL2 dependency
50-
if bld.env.DEST_OS == 'win32':
51-
bld(
52-
rule=(('cp' if 'MSYSTEM' in os.environ or sys.platform != 'win32' else 'copy')+' ${SRC} ${TGT}'),
53-
source='../lib/win32/'+bld.env.DEST_CPU+'/SDL2.dll',
54-
target='SDL2.dll',
55-
install_path=install_path,
56-
)
47+
install_path = bld.env.LIBDIR
5748

5849
bld.shlib(
5950
source = source,

wscript

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -591,6 +591,11 @@ def configure(conf):
591591
def build(bld):
592592
os.environ["CCACHE_DIR"] = os.path.abspath('.ccache/'+bld.env.COMPILER_CC+'/'+bld.env.DEST_OS+'/'+bld.env.DEST_CPU)
593593

594+
if bld.env.DEST_OS in ['win32', 'android']:
595+
sdl_name = 'SDL2.dll' if bld.env.DEST_OS == 'win32' else 'libSDL2.so'
596+
sdl_path = os.path.join('lib', bld.env.DEST_OS, bld.env.DEST_CPU, sdl_name)
597+
bld.install_files('${PREFIX}/', [sdl_path])
598+
594599
if bld.env.DEST_OS == 'win32':
595600
projects['game'] += ['utils/bzip2']
596601
projects['dedicated'] += ['utils/bzip2']

0 commit comments

Comments
 (0)