From 5bcf4e86fea946be7f1b3bea3194807cb2b3acae Mon Sep 17 00:00:00 2001 From: Pete Shand Date: Mon, 10 Oct 2022 13:24:10 +1100 Subject: [PATCH] use `.a` or `.lib` depending on platform --- .../Source/HaxeCompatibility/HaxeCompatibility.Build.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/SampleProject/Source/HaxeCompatibility/HaxeCompatibility.Build.cs b/SampleProject/Source/HaxeCompatibility/HaxeCompatibility.Build.cs index fc80690d..d4400e5c 100644 --- a/SampleProject/Source/HaxeCompatibility/HaxeCompatibility.Build.cs +++ b/SampleProject/Source/HaxeCompatibility/HaxeCompatibility.Build.cs @@ -68,8 +68,14 @@ public HaxeCompatibility(ReadOnlyTargetRules Target): base(Target) { // ======================================================================================== // * LIBRARIES // ======================================================================================== + // define a variable called "extension" and set it's value to ".lib" + // if the target platform is Windows, ".a" if it is Linux, and ".a" if it is Linux + string extension = ".a"; + if(Target.Platform == UnrealTargetPlatform.Win32 || Target.Platform == UnrealTargetPlatform.Win64) { + extension = ".lib"; + } PublicAdditionalLibraries.AddRange( new string[] { - Path.Combine(ModuleDirectory, "../../Haxe/HaxeStaticLib/bin/liboutput.lib"), + Path.Combine(ModuleDirectory, "../../Haxe/HaxeStaticLib/bin/liboutput" + extension), }); } }