Fix building engine with latest Windows platform toolset only
This commit is contained in:
@@ -31,9 +31,12 @@ namespace Flax.Build.Platforms
|
|||||||
if (sdk10 == null)
|
if (sdk10 == null)
|
||||||
_hasRequiredSDKsInstalled = false;
|
_hasRequiredSDKsInstalled = false;
|
||||||
|
|
||||||
// Need v141 toolset
|
// Need v141+ toolset
|
||||||
if (!GetToolsets().ContainsKey(WindowsPlatformToolset.v141))
|
if (!GetToolsets().ContainsKey(WindowsPlatformToolset.v141) &&
|
||||||
|
!GetToolsets().ContainsKey(WindowsPlatformToolset.v142))
|
||||||
|
{
|
||||||
_hasRequiredSDKsInstalled = false;
|
_hasRequiredSDKsInstalled = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ namespace Flax.Build.Platforms
|
|||||||
/// <param name="architecture">The target architecture.</param>
|
/// <param name="architecture">The target architecture.</param>
|
||||||
/// <param name="toolsetVer">The target platform toolset version.</param>
|
/// <param name="toolsetVer">The target platform toolset version.</param>
|
||||||
/// <param name="sdkVer">The target platform SDK version.</param>
|
/// <param name="sdkVer">The target platform SDK version.</param>
|
||||||
public UWPToolchain(UWPPlatform platform, TargetArchitecture architecture, WindowsPlatformToolset toolsetVer = WindowsPlatformToolset.v141, WindowsPlatformSDK sdkVer = WindowsPlatformSDK.Latest)
|
public UWPToolchain(UWPPlatform platform, TargetArchitecture architecture, WindowsPlatformToolset toolsetVer = WindowsPlatformToolset.Latest, WindowsPlatformSDK sdkVer = WindowsPlatformSDK.Latest)
|
||||||
: base(platform, architecture, toolsetVer, sdkVer)
|
: base(platform, architecture, toolsetVer, sdkVer)
|
||||||
{
|
{
|
||||||
var visualStudio = VisualStudioInstance.GetInstances().FirstOrDefault(x => x.Version == VisualStudioVersion.VisualStudio2017 || x.Version == VisualStudioVersion.VisualStudio2019);
|
var visualStudio = VisualStudioInstance.GetInstances().FirstOrDefault(x => x.Version == VisualStudioVersion.VisualStudio2017 || x.Version == VisualStudioVersion.VisualStudio2019);
|
||||||
|
|||||||
@@ -34,10 +34,12 @@ namespace Flax.Build.Platforms
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Need v140 toolset
|
// Need v140+ toolset
|
||||||
if (!GetToolsets().ContainsKey(WindowsPlatformToolset.v140))
|
if (!GetToolsets().ContainsKey(WindowsPlatformToolset.v140) &&
|
||||||
|
!GetToolsets().ContainsKey(WindowsPlatformToolset.v141) &&
|
||||||
|
!GetToolsets().ContainsKey(WindowsPlatformToolset.v142))
|
||||||
{
|
{
|
||||||
Log.Warning("Missing MSVC toolset v140 (VS 2015 C++ build tools). Cannot build for Windows platform.");
|
Log.Warning("Missing MSVC toolset v140 or later (VS 2015 or later C++ build tools). Cannot build for Windows platform.");
|
||||||
_hasRequiredSDKsInstalled = false;
|
_hasRequiredSDKsInstalled = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user