From 9817cfcae49fce34113f6cbd5730f0b19f1ce6d1 Mon Sep 17 00:00:00 2001 From: crazytuzi Date: Sun, 26 May 2024 20:38:27 +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 d4531b5..76bc2fb 100644 --- a/Mono.Build.cs +++ b/Mono.Build.cs @@ -131,7 +131,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"));