From efe13c3d0419db6427c31a07164c8541cfe77c08 Mon Sep 17 00:00:00 2001 From: Agent Agrimar Date: Sun, 13 Sep 2020 05:58:45 -0400 Subject: [PATCH] client: wscript: add winmm.lib dependency This fixes a linker error when compiling for win32 with Goldsrc Support enabled. --- cl_dll/wscript | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/cl_dll/wscript b/cl_dll/wscript index f02742b7..07dabf08 100644 --- a/cl_dll/wscript +++ b/cl_dll/wscript @@ -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: