2
0
mirror of https://github.com/FWGS/hlsdk-xash3d synced 2024-11-22 09:57:21 +01:00

client: wscript: add winmm.lib dependency

This fixes a linker error when compiling for win32 with Goldsrc Support enabled.
This commit is contained in:
Agent Agrimar 2020-09-13 05:58:45 -04:00 committed by Alibek Omarov
parent d7509365f0
commit efe13c3d04

View File

@ -10,12 +10,15 @@ def options(opt):
return
def configure(conf):
if conf.env.GOLDSRC and conf.env.DEST_OS != 'win32':
conf.check_cc(lib='dl')
if conf.env.DEST_OS == 'win32':
conf.check_cxx(lib='user32')
if conf.env.GOLDSRC:
if conf.env.DEST_OS == 'win32':
conf.check_cxx(lib='winmm')
else:
conf.check_cc(lib='dl')
def build(bld):
source = bld.path.parent.ant_glob([
'pm_shared/*.c'
@ -101,12 +104,15 @@ def build(bld):
defines += ['GOLDSOURCE_SUPPORT']
libs = []
if bld.env.GOLDSRC and bld.env.DEST_OS != 'win32':
libs += ['DL']
if bld.env.DEST_OS == 'win32':
libs += ["USER32"]
if bld.env.GOLDSRC:
if bld.env.DEST_OS == 'win32':
libs += ["WINMM"]
else:
libs += ['DL']
if bld.env.DEST_OS not in ['android', 'dos']:
install_path = os.path.join(bld.env.GAMEDIR, bld.env.CLIENT_DIR)
else: