Add Switch platform
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,6 +41,11 @@ namespace Flax.Build
|
||||
/// Running on Android.
|
||||
/// </summary>
|
||||
Android = 7,
|
||||
|
||||
/// <summary>
|
||||
/// Running on Switch.
|
||||
/// </summary>
|
||||
Switch = 8,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -237,6 +237,7 @@ namespace Flax.Deps
|
||||
}
|
||||
case TargetPlatform.Linux:
|
||||
case TargetPlatform.PS4:
|
||||
case TargetPlatform.Switch:
|
||||
{
|
||||
cmdLine = "CMakeLists.txt";
|
||||
break;
|
||||
|
||||
@@ -143,6 +143,7 @@
|
||||
<Compile Include="Platforms\Windows\*.cs" />
|
||||
<Compile Include="Platforms\XboxOne\*.cs" />
|
||||
<Compile Include="..\..\Platforms\XboxScarlett\Flax.Build\*.cs" />
|
||||
<Compile Include="..\..\Platforms\Switch\Flax.Build\*.cs" />
|
||||
<Compile Include="Projects\IProjectCustomizer.cs" />
|
||||
<Compile Include="Projects\Project.cs" />
|
||||
<Compile Include="Projects\ProjectFormat.cs" />
|
||||
|
||||
@@ -34,6 +34,7 @@ namespace Flax.Build
|
||||
TargetPlatform.PS4,
|
||||
TargetPlatform.XboxScarlett,
|
||||
TargetPlatform.Android,
|
||||
TargetPlatform.Switch,
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -61,6 +61,7 @@ namespace Flax.Build.Platforms
|
||||
case TargetPlatform.PS4: return Sdk.HasValid("PS4Sdk");
|
||||
case TargetPlatform.XboxScarlett: return GetSDKs().ContainsKey(WindowsPlatformSDK.v10_0_19041_0) && Sdk.HasValid("GDK");
|
||||
case TargetPlatform.Android: return AndroidSdk.Instance.IsValid && AndroidNdk.Instance.IsValid;
|
||||
case TargetPlatform.Switch: return Sdk.HasValid("SwitchSdk");
|
||||
default: return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user