From 667137baf45f90b3c3ba95e1c526e165a99ae009 Mon Sep 17 00:00:00 2001 From: Mamadou Babaei Date: Tue, 21 Jul 2026 17:22:03 +0200 Subject: [PATCH] another attempt at fixing fab store submission build issues for ue 5.8 which also changes msvc third-binary selection behavior on windows --- Handbook/src/appendix/changelog.md | 12 ++++++ .../SGCommonThirdPartyLibs.Build.cs | 42 ++++++++----------- .../SGConnectShmThirdPartyLibs.Build.cs | 42 ++++++++----------- .../SGConnectThirdPartyLibs.Build.cs | 42 ++++++++----------- .../SGCoreShmThirdPartyLibs.Build.cs | 42 ++++++++----------- .../SGCoreThirdPartyLibs.Build.cs | 42 ++++++++----------- .../SGFakeShmThirdPartyLibs.Build.cs | 42 ++++++++----------- .../SGFlatBuffersThirdPartyLibs.Build.cs | 42 ++++++++----------- .../SGFmtThirdPartyLibs.Build.cs | 42 ++++++++----------- .../SGLogThirdPartyLibs.Build.cs | 42 ++++++++----------- .../SGLoguruThirdPartyLibs.Build.cs | 42 ++++++++----------- .../SGNngThirdPartyLibs.Build.cs | 42 ++++++++----------- .../SGRapidYamlThirdPartyLibs.Build.cs | 42 ++++++++----------- .../SGSerialThirdPartyLibs.Build.cs | 42 ++++++++----------- .../SGWjwwoodSerialThirdPartyLibs.Build.cs | 42 ++++++++----------- 15 files changed, 264 insertions(+), 336 deletions(-) diff --git a/Handbook/src/appendix/changelog.md b/Handbook/src/appendix/changelog.md index 9e33c36a..b69b52a7 100644 --- a/Handbook/src/appendix/changelog.md +++ b/Handbook/src/appendix/changelog.md @@ -5,6 +5,18 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [Unreleased] + +This patch release attempts to resolve Microsoft Windows/MSVC build issues affecting Unreal Engine `5.8` Fab Store submissions for the `v2.9.x` release series. + +### Fixed + +- Another attempt at resolving build issues that affect Fab Store submissions caused by the following toolset mismatch: `MSIL .netmodule or module compiled with /GL found; restarting link with /LTCG; add /LTCG to the link command line to improve linker performance fatal error C1900: Il mismatch between 'P1' version '20250730' and 'P2' version '20240319'; LINK : fatal error LNK1257: code generation failed`. + +### Changed + +- Now, instead of forcing specific Windows binaries built with any specific MSVC toolset for third-party libraries based on the engine version, the third-party modules' `.Build.cs` files directly check the compiler version and select the corresponding binaries built for that specific toolset. The reason for enforcing this behavior is that, for UE `5.8` Fab builds, Fab Store appears to build its binaries against `v143: 14.44.35207` rather than `v145: 14.50.35717` when both toolsets are installed simultaneously. On local UE installations, when only `v143: 14.44.35207` is installed, the build can similarly fail due to a toolset mismatch. As a result, from this release onwards, the enforced binary selection behavior will be the default on all supported engine versions. + ## [2.9.1] - 2026-07-17 This patch release addresses `v2.9.x` build issues on Microsoft Windows and MSVC. diff --git a/Source/ThirdParty/SGCommonThirdPartyLibs/SGCommonThirdPartyLibs.Build.cs b/Source/ThirdParty/SGCommonThirdPartyLibs/SGCommonThirdPartyLibs.Build.cs index f2c3027b..61159d5c 100644 --- a/Source/ThirdParty/SGCommonThirdPartyLibs/SGCommonThirdPartyLibs.Build.cs +++ b/Source/ThirdParty/SGCommonThirdPartyLibs/SGCommonThirdPartyLibs.Build.cs @@ -114,31 +114,25 @@ public class SGCommonThirdPartyLibs : ModuleRules else if (bIsWin64) { LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "windows")); - switch (Target.WindowsPlatform.Compiler) + + Version compilerVersion = Version.Parse(Target.WindowsPlatform.CompilerVersion.ToString()); + string toolsetVersion = $"{compilerVersion.Major}.{compilerVersion.Minor:D2}"; + + if (toolsetVersion == "14.50") { -#if UE_5_7_OR_LATER - case WindowsCompiler.VisualStudio2026: -#if UE_5_8_OR_LATER - LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v145-1450")); -#elif UE_5_7_OR_LATER - LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1444")); -#else - Debug.Assert(false, "Unsupported engine version or compiler!"); -#endif - break; -#endif - case WindowsCompiler.VisualStudio2022: -#if UE_5_7_OR_LATER - LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1444")); -#elif UE_5_5_OR_LATER - LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1438")); -#else - Debug.Assert(false, "Unsupported engine version or compiler!"); -#endif - break; - default: - Debug.Assert(false, "Unsupported engine version or compiler!"); - break; + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v145-1450")); + } + else if (toolsetVersion == "14.44") + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1444")); + } + else if (toolsetVersion == "14.38") + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1438")); + } + else + { + Debug.Assert(false, "Unsupported MSVC toolset!"); } LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64")); diff --git a/Source/ThirdParty/SGConnectShmThirdPartyLibs/SGConnectShmThirdPartyLibs.Build.cs b/Source/ThirdParty/SGConnectShmThirdPartyLibs/SGConnectShmThirdPartyLibs.Build.cs index 73f302e1..5dcb4b87 100644 --- a/Source/ThirdParty/SGConnectShmThirdPartyLibs/SGConnectShmThirdPartyLibs.Build.cs +++ b/Source/ThirdParty/SGConnectShmThirdPartyLibs/SGConnectShmThirdPartyLibs.Build.cs @@ -94,31 +94,25 @@ public class SGConnectShmThirdPartyLibs : ModuleRules else if (bIsWin64) { LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "windows")); - switch (Target.WindowsPlatform.Compiler) + + Version compilerVersion = Version.Parse(Target.WindowsPlatform.CompilerVersion.ToString()); + string toolsetVersion = $"{compilerVersion.Major}.{compilerVersion.Minor:D2}"; + + if (toolsetVersion == "14.50") { -#if UE_5_7_OR_LATER - case WindowsCompiler.VisualStudio2026: -#if UE_5_8_OR_LATER - LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v145-1450")); -#elif UE_5_7_OR_LATER - LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1444")); -#else - Debug.Assert(false, "Unsupported engine version or compiler!"); -#endif - break; -#endif - case WindowsCompiler.VisualStudio2022: -#if UE_5_7_OR_LATER - LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1444")); -#elif UE_5_5_OR_LATER - LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1438")); -#else - Debug.Assert(false, "Unsupported engine version or compiler!"); -#endif - break; - default: - Debug.Assert(false, "Unsupported engine version or compiler!"); - break; + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v145-1450")); + } + else if (toolsetVersion == "14.44") + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1444")); + } + else if (toolsetVersion == "14.38") + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1438")); + } + else + { + Debug.Assert(false, "Unsupported MSVC toolset!"); } LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64")); diff --git a/Source/ThirdParty/SGConnectThirdPartyLibs/SGConnectThirdPartyLibs.Build.cs b/Source/ThirdParty/SGConnectThirdPartyLibs/SGConnectThirdPartyLibs.Build.cs index e77a150d..8b009abf 100644 --- a/Source/ThirdParty/SGConnectThirdPartyLibs/SGConnectThirdPartyLibs.Build.cs +++ b/Source/ThirdParty/SGConnectThirdPartyLibs/SGConnectThirdPartyLibs.Build.cs @@ -114,31 +114,25 @@ public class SGConnectThirdPartyLibs : ModuleRules else if (bIsWin64) { LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "windows")); - switch (Target.WindowsPlatform.Compiler) + + Version compilerVersion = Version.Parse(Target.WindowsPlatform.CompilerVersion.ToString()); + string toolsetVersion = $"{compilerVersion.Major}.{compilerVersion.Minor:D2}"; + + if (toolsetVersion == "14.50") { -#if UE_5_7_OR_LATER - case WindowsCompiler.VisualStudio2026: -#if UE_5_8_OR_LATER - LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v145-1450")); -#elif UE_5_7_OR_LATER - LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1444")); -#else - Debug.Assert(false, "Unsupported engine version or compiler!"); -#endif - break; -#endif - case WindowsCompiler.VisualStudio2022: -#if UE_5_7_OR_LATER - LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1444")); -#elif UE_5_5_OR_LATER - LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1438")); -#else - Debug.Assert(false, "Unsupported engine version or compiler!"); -#endif - break; - default: - Debug.Assert(false, "Unsupported engine version or compiler!"); - break; + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v145-1450")); + } + else if (toolsetVersion == "14.44") + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1444")); + } + else if (toolsetVersion == "14.38") + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1438")); + } + else + { + Debug.Assert(false, "Unsupported MSVC toolset!"); } LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64")); diff --git a/Source/ThirdParty/SGCoreShmThirdPartyLibs/SGCoreShmThirdPartyLibs.Build.cs b/Source/ThirdParty/SGCoreShmThirdPartyLibs/SGCoreShmThirdPartyLibs.Build.cs index 5c07158a..c4da9860 100644 --- a/Source/ThirdParty/SGCoreShmThirdPartyLibs/SGCoreShmThirdPartyLibs.Build.cs +++ b/Source/ThirdParty/SGCoreShmThirdPartyLibs/SGCoreShmThirdPartyLibs.Build.cs @@ -94,31 +94,25 @@ public class SGCoreShmThirdPartyLibs : ModuleRules else if (bIsWin64) { LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "windows")); - switch (Target.WindowsPlatform.Compiler) + + Version compilerVersion = Version.Parse(Target.WindowsPlatform.CompilerVersion.ToString()); + string toolsetVersion = $"{compilerVersion.Major}.{compilerVersion.Minor:D2}"; + + if (toolsetVersion == "14.50") { -#if UE_5_7_OR_LATER - case WindowsCompiler.VisualStudio2026: -#if UE_5_8_OR_LATER - LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v145-1450")); -#elif UE_5_7_OR_LATER - LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1444")); -#else - Debug.Assert(false, "Unsupported engine version or compiler!"); -#endif - break; -#endif - case WindowsCompiler.VisualStudio2022: -#if UE_5_7_OR_LATER - LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1444")); -#elif UE_5_5_OR_LATER - LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1438")); -#else - Debug.Assert(false, "Unsupported engine version or compiler!"); -#endif - break; - default: - Debug.Assert(false, "Unsupported engine version or compiler!"); - break; + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v145-1450")); + } + else if (toolsetVersion == "14.44") + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1444")); + } + else if (toolsetVersion == "14.38") + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1438")); + } + else + { + Debug.Assert(false, "Unsupported MSVC toolset!"); } LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64")); diff --git a/Source/ThirdParty/SGCoreThirdPartyLibs/SGCoreThirdPartyLibs.Build.cs b/Source/ThirdParty/SGCoreThirdPartyLibs/SGCoreThirdPartyLibs.Build.cs index a8d3c02c..d7c1748b 100644 --- a/Source/ThirdParty/SGCoreThirdPartyLibs/SGCoreThirdPartyLibs.Build.cs +++ b/Source/ThirdParty/SGCoreThirdPartyLibs/SGCoreThirdPartyLibs.Build.cs @@ -114,31 +114,25 @@ public class SGCoreThirdPartyLibs : ModuleRules else if (bIsWin64) { LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "windows")); - switch (Target.WindowsPlatform.Compiler) + + Version compilerVersion = Version.Parse(Target.WindowsPlatform.CompilerVersion.ToString()); + string toolsetVersion = $"{compilerVersion.Major}.{compilerVersion.Minor:D2}"; + + if (toolsetVersion == "14.50") { -#if UE_5_7_OR_LATER - case WindowsCompiler.VisualStudio2026: -#if UE_5_8_OR_LATER - LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v145-1450")); -#elif UE_5_7_OR_LATER - LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1444")); -#else - Debug.Assert(false, "Unsupported engine version or compiler!"); -#endif - break; -#endif - case WindowsCompiler.VisualStudio2022: -#if UE_5_7_OR_LATER - LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1444")); -#elif UE_5_5_OR_LATER - LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1438")); -#else - Debug.Assert(false, "Unsupported engine version or compiler!"); -#endif - break; - default: - Debug.Assert(false, "Unsupported engine version or compiler!"); - break; + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v145-1450")); + } + else if (toolsetVersion == "14.44") + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1444")); + } + else if (toolsetVersion == "14.38") + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1438")); + } + else + { + Debug.Assert(false, "Unsupported MSVC toolset!"); } LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64")); diff --git a/Source/ThirdParty/SGFakeShmThirdPartyLibs/SGFakeShmThirdPartyLibs.Build.cs b/Source/ThirdParty/SGFakeShmThirdPartyLibs/SGFakeShmThirdPartyLibs.Build.cs index 6629f58e..c88af0bb 100644 --- a/Source/ThirdParty/SGFakeShmThirdPartyLibs/SGFakeShmThirdPartyLibs.Build.cs +++ b/Source/ThirdParty/SGFakeShmThirdPartyLibs/SGFakeShmThirdPartyLibs.Build.cs @@ -94,31 +94,25 @@ public class SGFakeShmThirdPartyLibs : ModuleRules else if (bIsWin64) { LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "windows")); - switch (Target.WindowsPlatform.Compiler) + + Version compilerVersion = Version.Parse(Target.WindowsPlatform.CompilerVersion.ToString()); + string toolsetVersion = $"{compilerVersion.Major}.{compilerVersion.Minor:D2}"; + + if (toolsetVersion == "14.50") { -#if UE_5_7_OR_LATER - case WindowsCompiler.VisualStudio2026: -#if UE_5_8_OR_LATER - LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v145-1450")); -#elif UE_5_7_OR_LATER - LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1444")); -#else - Debug.Assert(false, "Unsupported engine version or compiler!"); -#endif - break; -#endif - case WindowsCompiler.VisualStudio2022: -#if UE_5_7_OR_LATER - LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1444")); -#elif UE_5_5_OR_LATER - LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1438")); -#else - Debug.Assert(false, "Unsupported engine version or compiler!"); -#endif - break; - default: - Debug.Assert(false, "Unsupported engine version or compiler!"); - break; + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v145-1450")); + } + else if (toolsetVersion == "14.44") + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1444")); + } + else if (toolsetVersion == "14.38") + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1438")); + } + else + { + Debug.Assert(false, "Unsupported MSVC toolset!"); } LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64")); diff --git a/Source/ThirdParty/SGFlatBuffersThirdPartyLibs/SGFlatBuffersThirdPartyLibs.Build.cs b/Source/ThirdParty/SGFlatBuffersThirdPartyLibs/SGFlatBuffersThirdPartyLibs.Build.cs index 784a719e..3b705802 100644 --- a/Source/ThirdParty/SGFlatBuffersThirdPartyLibs/SGFlatBuffersThirdPartyLibs.Build.cs +++ b/Source/ThirdParty/SGFlatBuffersThirdPartyLibs/SGFlatBuffersThirdPartyLibs.Build.cs @@ -94,31 +94,25 @@ public class SGFlatBuffersThirdPartyLibs : ModuleRules else if (bIsWin64) { LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "windows")); - switch (Target.WindowsPlatform.Compiler) + + Version compilerVersion = Version.Parse(Target.WindowsPlatform.CompilerVersion.ToString()); + string toolsetVersion = $"{compilerVersion.Major}.{compilerVersion.Minor:D2}"; + + if (toolsetVersion == "14.50") { -#if UE_5_7_OR_LATER - case WindowsCompiler.VisualStudio2026: -#if UE_5_8_OR_LATER - LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v145-1450")); -#elif UE_5_7_OR_LATER - LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1444")); -#else - Debug.Assert(false, "Unsupported engine version or compiler!"); -#endif - break; -#endif - case WindowsCompiler.VisualStudio2022: -#if UE_5_7_OR_LATER - LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1444")); -#elif UE_5_5_OR_LATER - LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1438")); -#else - Debug.Assert(false, "Unsupported engine version or compiler!"); -#endif - break; - default: - Debug.Assert(false, "Unsupported engine version or compiler!"); - break; + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v145-1450")); + } + else if (toolsetVersion == "14.44") + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1444")); + } + else if (toolsetVersion == "14.38") + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1438")); + } + else + { + Debug.Assert(false, "Unsupported MSVC toolset!"); } LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64")); diff --git a/Source/ThirdParty/SGFmtThirdPartyLibs/SGFmtThirdPartyLibs.Build.cs b/Source/ThirdParty/SGFmtThirdPartyLibs/SGFmtThirdPartyLibs.Build.cs index de96bdd1..5bde5803 100644 --- a/Source/ThirdParty/SGFmtThirdPartyLibs/SGFmtThirdPartyLibs.Build.cs +++ b/Source/ThirdParty/SGFmtThirdPartyLibs/SGFmtThirdPartyLibs.Build.cs @@ -119,31 +119,25 @@ public class SGFmtThirdPartyLibs : ModuleRules else if (bIsWin64) { LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "windows")); - switch (Target.WindowsPlatform.Compiler) + + Version compilerVersion = Version.Parse(Target.WindowsPlatform.CompilerVersion.ToString()); + string toolsetVersion = $"{compilerVersion.Major}.{compilerVersion.Minor:D2}"; + + if (toolsetVersion == "14.50") { -#if UE_5_7_OR_LATER - case WindowsCompiler.VisualStudio2026: -#if UE_5_8_OR_LATER - LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v145-1450")); -#elif UE_5_7_OR_LATER - LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1444")); -#else - Debug.Assert(false, "Unsupported engine version or compiler!"); -#endif - break; -#endif - case WindowsCompiler.VisualStudio2022: -#if UE_5_7_OR_LATER - LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1444")); -#elif UE_5_5_OR_LATER - LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1438")); -#else - Debug.Assert(false, "Unsupported engine version or compiler!"); -#endif - break; - default: - Debug.Assert(false, "Unsupported engine version or compiler!"); - break; + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v145-1450")); + } + else if (toolsetVersion == "14.44") + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1444")); + } + else if (toolsetVersion == "14.38") + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1438")); + } + else + { + Debug.Assert(false, "Unsupported MSVC toolset!"); } LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64")); diff --git a/Source/ThirdParty/SGLogThirdPartyLibs/SGLogThirdPartyLibs.Build.cs b/Source/ThirdParty/SGLogThirdPartyLibs/SGLogThirdPartyLibs.Build.cs index ddcc8340..e37c386c 100644 --- a/Source/ThirdParty/SGLogThirdPartyLibs/SGLogThirdPartyLibs.Build.cs +++ b/Source/ThirdParty/SGLogThirdPartyLibs/SGLogThirdPartyLibs.Build.cs @@ -114,31 +114,25 @@ public class SGLogThirdPartyLibs : ModuleRules else if (bIsWin64) { LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "windows")); - switch (Target.WindowsPlatform.Compiler) + + Version compilerVersion = Version.Parse(Target.WindowsPlatform.CompilerVersion.ToString()); + string toolsetVersion = $"{compilerVersion.Major}.{compilerVersion.Minor:D2}"; + + if (toolsetVersion == "14.50") { -#if UE_5_7_OR_LATER - case WindowsCompiler.VisualStudio2026: -#if UE_5_8_OR_LATER - LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v145-1450")); -#elif UE_5_7_OR_LATER - LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1444")); -#else - Debug.Assert(false, "Unsupported engine version or compiler!"); -#endif - break; -#endif - case WindowsCompiler.VisualStudio2022: -#if UE_5_7_OR_LATER - LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1444")); -#elif UE_5_5_OR_LATER - LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1438")); -#else - Debug.Assert(false, "Unsupported engine version or compiler!"); -#endif - break; - default: - Debug.Assert(false, "Unsupported engine version or compiler!"); - break; + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v145-1450")); + } + else if (toolsetVersion == "14.44") + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1444")); + } + else if (toolsetVersion == "14.38") + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1438")); + } + else + { + Debug.Assert(false, "Unsupported MSVC toolset!"); } LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64")); diff --git a/Source/ThirdParty/SGLoguruThirdPartyLibs/SGLoguruThirdPartyLibs.Build.cs b/Source/ThirdParty/SGLoguruThirdPartyLibs/SGLoguruThirdPartyLibs.Build.cs index b49ddd96..5212e090 100644 --- a/Source/ThirdParty/SGLoguruThirdPartyLibs/SGLoguruThirdPartyLibs.Build.cs +++ b/Source/ThirdParty/SGLoguruThirdPartyLibs/SGLoguruThirdPartyLibs.Build.cs @@ -119,31 +119,25 @@ public class SGLoguruThirdPartyLibs : ModuleRules else if (bIsWin64) { LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "windows")); - switch (Target.WindowsPlatform.Compiler) + + Version compilerVersion = Version.Parse(Target.WindowsPlatform.CompilerVersion.ToString()); + string toolsetVersion = $"{compilerVersion.Major}.{compilerVersion.Minor:D2}"; + + if (toolsetVersion == "14.50") { -#if UE_5_7_OR_LATER - case WindowsCompiler.VisualStudio2026: -#if UE_5_8_OR_LATER - LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v145-1450")); -#elif UE_5_7_OR_LATER - LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1444")); -#else - Debug.Assert(false, "Unsupported engine version or compiler!"); -#endif - break; -#endif - case WindowsCompiler.VisualStudio2022: -#if UE_5_7_OR_LATER - LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1444")); -#elif UE_5_5_OR_LATER - LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1438")); -#else - Debug.Assert(false, "Unsupported engine version or compiler!"); -#endif - break; - default: - Debug.Assert(false, "Unsupported engine version or compiler!"); - break; + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v145-1450")); + } + else if (toolsetVersion == "14.44") + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1444")); + } + else if (toolsetVersion == "14.38") + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1438")); + } + else + { + Debug.Assert(false, "Unsupported MSVC toolset!"); } LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64")); diff --git a/Source/ThirdParty/SGNngThirdPartyLibs/SGNngThirdPartyLibs.Build.cs b/Source/ThirdParty/SGNngThirdPartyLibs/SGNngThirdPartyLibs.Build.cs index 7bcfd770..12bb4e5b 100644 --- a/Source/ThirdParty/SGNngThirdPartyLibs/SGNngThirdPartyLibs.Build.cs +++ b/Source/ThirdParty/SGNngThirdPartyLibs/SGNngThirdPartyLibs.Build.cs @@ -94,31 +94,25 @@ public class SGNngThirdPartyLibs : ModuleRules else if (bIsWin64) { LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "windows")); - switch (Target.WindowsPlatform.Compiler) + + Version compilerVersion = Version.Parse(Target.WindowsPlatform.CompilerVersion.ToString()); + string toolsetVersion = $"{compilerVersion.Major}.{compilerVersion.Minor:D2}"; + + if (toolsetVersion == "14.50") { -#if UE_5_7_OR_LATER - case WindowsCompiler.VisualStudio2026: -#if UE_5_8_OR_LATER - LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v145-1450")); -#elif UE_5_7_OR_LATER - LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1444")); -#else - Debug.Assert(false, "Unsupported engine version or compiler!"); -#endif - break; -#endif - case WindowsCompiler.VisualStudio2022: -#if UE_5_7_OR_LATER - LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1444")); -#elif UE_5_5_OR_LATER - LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1438")); -#else - Debug.Assert(false, "Unsupported engine version or compiler!"); -#endif - break; - default: - Debug.Assert(false, "Unsupported engine version or compiler!"); - break; + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v145-1450")); + } + else if (toolsetVersion == "14.44") + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1444")); + } + else if (toolsetVersion == "14.38") + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1438")); + } + else + { + Debug.Assert(false, "Unsupported MSVC toolset!"); } LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64")); diff --git a/Source/ThirdParty/SGRapidYamlThirdPartyLibs/SGRapidYamlThirdPartyLibs.Build.cs b/Source/ThirdParty/SGRapidYamlThirdPartyLibs/SGRapidYamlThirdPartyLibs.Build.cs index 30c0bea6..3148b00f 100644 --- a/Source/ThirdParty/SGRapidYamlThirdPartyLibs/SGRapidYamlThirdPartyLibs.Build.cs +++ b/Source/ThirdParty/SGRapidYamlThirdPartyLibs/SGRapidYamlThirdPartyLibs.Build.cs @@ -97,31 +97,25 @@ public class SGRapidYamlThirdPartyLibs : ModuleRules else if (bIsWin64) { LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "windows")); - switch (Target.WindowsPlatform.Compiler) + + Version compilerVersion = Version.Parse(Target.WindowsPlatform.CompilerVersion.ToString()); + string toolsetVersion = $"{compilerVersion.Major}.{compilerVersion.Minor:D2}"; + + if (toolsetVersion == "14.50") { -#if UE_5_7_OR_LATER - case WindowsCompiler.VisualStudio2026: -#if UE_5_8_OR_LATER - LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v145-1450")); -#elif UE_5_7_OR_LATER - LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1444")); -#else - Debug.Assert(false, "Unsupported engine version or compiler!"); -#endif - break; -#endif - case WindowsCompiler.VisualStudio2022: -#if UE_5_7_OR_LATER - LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1444")); -#elif UE_5_5_OR_LATER - LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1438")); -#else - Debug.Assert(false, "Unsupported engine version or compiler!"); -#endif - break; - default: - Debug.Assert(false, "Unsupported engine version or compiler!"); - break; + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v145-1450")); + } + else if (toolsetVersion == "14.44") + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1444")); + } + else if (toolsetVersion == "14.38") + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1438")); + } + else + { + Debug.Assert(false, "Unsupported MSVC toolset!"); } LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64")); diff --git a/Source/ThirdParty/SGSerialThirdPartyLibs/SGSerialThirdPartyLibs.Build.cs b/Source/ThirdParty/SGSerialThirdPartyLibs/SGSerialThirdPartyLibs.Build.cs index fd900799..03e57b22 100644 --- a/Source/ThirdParty/SGSerialThirdPartyLibs/SGSerialThirdPartyLibs.Build.cs +++ b/Source/ThirdParty/SGSerialThirdPartyLibs/SGSerialThirdPartyLibs.Build.cs @@ -94,31 +94,25 @@ public class SGSerialThirdPartyLibs : ModuleRules else if (bIsWin64) { LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "windows")); - switch (Target.WindowsPlatform.Compiler) + + Version compilerVersion = Version.Parse(Target.WindowsPlatform.CompilerVersion.ToString()); + string toolsetVersion = $"{compilerVersion.Major}.{compilerVersion.Minor:D2}"; + + if (toolsetVersion == "14.50") { -#if UE_5_7_OR_LATER - case WindowsCompiler.VisualStudio2026: -#if UE_5_8_OR_LATER - LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v145-1450")); -#elif UE_5_7_OR_LATER - LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1444")); -#else - Debug.Assert(false, "Unsupported engine version or compiler!"); -#endif - break; -#endif - case WindowsCompiler.VisualStudio2022: -#if UE_5_7_OR_LATER - LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1444")); -#elif UE_5_5_OR_LATER - LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1438")); -#else - Debug.Assert(false, "Unsupported engine version or compiler!"); -#endif - break; - default: - Debug.Assert(false, "Unsupported engine version or compiler!"); - break; + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v145-1450")); + } + else if (toolsetVersion == "14.44") + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1444")); + } + else if (toolsetVersion == "14.38") + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1438")); + } + else + { + Debug.Assert(false, "Unsupported MSVC toolset!"); } LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64")); diff --git a/Source/ThirdParty/SGWjwwoodSerialThirdPartyLibs/SGWjwwoodSerialThirdPartyLibs.Build.cs b/Source/ThirdParty/SGWjwwoodSerialThirdPartyLibs/SGWjwwoodSerialThirdPartyLibs.Build.cs index 750c1797..d859acf1 100644 --- a/Source/ThirdParty/SGWjwwoodSerialThirdPartyLibs/SGWjwwoodSerialThirdPartyLibs.Build.cs +++ b/Source/ThirdParty/SGWjwwoodSerialThirdPartyLibs/SGWjwwoodSerialThirdPartyLibs.Build.cs @@ -94,31 +94,25 @@ public class SGWjwwoodSerialThirdPartyLibs : ModuleRules else if (bIsWin64) { LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "windows")); - switch (Target.WindowsPlatform.Compiler) + + Version compilerVersion = Version.Parse(Target.WindowsPlatform.CompilerVersion.ToString()); + string toolsetVersion = $"{compilerVersion.Major}.{compilerVersion.Minor:D2}"; + + if (toolsetVersion == "14.50") { -#if UE_5_7_OR_LATER - case WindowsCompiler.VisualStudio2026: -#if UE_5_8_OR_LATER - LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v145-1450")); -#elif UE_5_7_OR_LATER - LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1444")); -#else - Debug.Assert(false, "Unsupported engine version or compiler!"); -#endif - break; -#endif - case WindowsCompiler.VisualStudio2022: -#if UE_5_7_OR_LATER - LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1444")); -#elif UE_5_5_OR_LATER - LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1438")); -#else - Debug.Assert(false, "Unsupported engine version or compiler!"); -#endif - break; - default: - Debug.Assert(false, "Unsupported engine version or compiler!"); - break; + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v145-1450")); + } + else if (toolsetVersion == "14.44") + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1444")); + } + else if (toolsetVersion == "14.38") + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1438")); + } + else + { + Debug.Assert(false, "Unsupported MSVC toolset!"); } LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64"));