Add Switch platform

This commit is contained in:
Wojtek Figat
2021-03-09 14:26:30 +01:00
parent 044234a55b
commit cc201e198d
40 changed files with 123 additions and 3 deletions

View File

@@ -31,6 +31,7 @@ namespace Flax.Build
case TargetPlatform.Linux:
case TargetPlatform.PS4:
case TargetPlatform.Android:
case TargetPlatform.Switch:
options.OutputFiles.Add(Path.Combine(path, string.Format("lib{0}.a", name)));
break;
default: throw new InvalidPlatformException(options.Platform.Target);

View File

@@ -90,6 +90,7 @@ namespace Flax.Build
case TargetPlatform.PS4: return "PLATFORM_PS4";
case TargetPlatform.XboxScarlett: return "PLATFORM_XBOX_SCARLETT";
case TargetPlatform.Android: return "PLATFORM_ANDROID";
case TargetPlatform.Switch: return "PLATFORM_SWITCH";
default: throw new InvalidPlatformException(platform);
}
}

View File

@@ -230,6 +230,7 @@ namespace Flax.Build
case TargetPlatform.Linux: return targetArchitecture == TargetArchitecture.x64;
case TargetPlatform.PS4: return targetArchitecture == TargetArchitecture.x64;
case TargetPlatform.Android: return targetArchitecture == TargetArchitecture.ARM64;
case TargetPlatform.Switch: return targetArchitecture == TargetArchitecture.ARM64;
default: return false;
}
}

View File

@@ -41,6 +41,11 @@ namespace Flax.Build
/// Running on Android.
/// </summary>
Android = 7,
/// <summary>
/// Running on Switch.
/// </summary>
Switch = 8,
}
/// <summary>