From 5226f599d0013f9e6bf76114ecb13cc0677ceabb Mon Sep 17 00:00:00 2001 From: crazytuzi Date: Sun, 26 May 2024 20:34:59 +0800 Subject: [PATCH] Fixed macOS Compile Error --- Mono.Build.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Mono.Build.cs b/Mono.Build.cs index 3c5f3e6..8f8c99c 100644 --- a/Mono.Build.cs +++ b/Mono.Build.cs @@ -126,7 +126,15 @@ public class Mono : ModuleRules } else if (Target.Platform == UnrealTargetPlatform.Mac) { - var PlatformLibraryPath = Path.Combine(LibraryPath, $"macOS_{Target.Architecture}"); + var PlatformLibraryPath = Path.Combine(LibraryPath, +#if UE_5_2_OR_LATER + Target.Architecture.bIsX64 +#else + Target.Architecture == "x86_64" || Target.Architecture == "x64" +#endif + + ? "macOS_x86_64" + : "macOS_arm64"); PublicAdditionalLibraries.Add(Path.Combine(PlatformLibraryPath, "libmonosgen-2.0.a"));