From 598ef73a8e685c98c1fbb5ab313b8095fcd75b7f Mon Sep 17 00:00:00 2001 From: tschumann Date: Sat, 22 Feb 2025 12:26:45 +1000 Subject: [PATCH] Fix loader tests not compiling for Linux. --- loader/test/AMBuilder | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/loader/test/AMBuilder b/loader/test/AMBuilder index 2009730..040dcf7 100644 --- a/loader/test/AMBuilder +++ b/loader/test/AMBuilder @@ -5,9 +5,18 @@ for cxx in MMS.all_targets: name = 'test_loader' binary = MMS.Program(cxx, name) + # NOTE: this macro isn't getting fed through for some reason if binary.compiler.target.platform == 'windows' and binary.compiler.target.arch == 'x86_64': binary.compiler.defines += ['WIN64'] + # add some required defines for Linux builds + if binary.compiler.target.platform == 'linux' and binary.compiler.target.arch == 'x86': + binary.compiler.defines += ['LIB_PREFIX=""', 'LIB_SUFFIX="_i486.so"'] + + # add some required defines for Linux builds + if binary.compiler.target.platform == 'linux' and binary.compiler.target.arch == 'x86_64': + binary.compiler.defines += ['LIB_PREFIX="lib"', 'LIB_SUFFIX=".so"'] + # TODO: hack - something makes it try and compile with /SUBSYSTEM:WINDOWS which then causes it to complain that WinMain is missing if binary.compiler.target.platform == 'windows': binary.compiler.linkflags = ['Advapi32.lib', 'kernel32.lib', 'shell32.lib'] @@ -26,7 +35,7 @@ for cxx in MMS.all_targets: binary.sources += [ 'main.cpp', '../gamedll.cpp', - '../loader.cpp', + '../loader.cpp', '../serverplugin.cpp', '../utility.cpp', 'testdeterminebackends1.cpp',