Add reusable lists with all platforms, architectures and configurations for Flax.Build targets
This commit is contained in:
@@ -119,37 +119,17 @@ namespace Flax.Build
|
||||
/// <summary>
|
||||
/// The target platforms.
|
||||
/// </summary>
|
||||
public TargetPlatform[] Platforms =
|
||||
{
|
||||
TargetPlatform.Windows,
|
||||
TargetPlatform.UWP,
|
||||
TargetPlatform.XboxOne,
|
||||
TargetPlatform.Linux,
|
||||
TargetPlatform.PS4,
|
||||
TargetPlatform.XboxScarlett,
|
||||
TargetPlatform.Android,
|
||||
};
|
||||
public TargetPlatform[] Platforms = Globals.AllPlatforms;
|
||||
|
||||
/// <summary>
|
||||
/// The target platform architectures.
|
||||
/// </summary>
|
||||
public TargetArchitecture[] Architectures =
|
||||
{
|
||||
TargetArchitecture.x64,
|
||||
TargetArchitecture.x86,
|
||||
TargetArchitecture.ARM,
|
||||
TargetArchitecture.ARM64,
|
||||
};
|
||||
public TargetArchitecture[] Architectures = Globals.AllArchitectures;
|
||||
|
||||
/// <summary>
|
||||
/// The target build configurations.
|
||||
/// </summary>
|
||||
public TargetConfiguration[] Configurations =
|
||||
{
|
||||
TargetConfiguration.Debug,
|
||||
TargetConfiguration.Development,
|
||||
TargetConfiguration.Release,
|
||||
};
|
||||
public TargetConfiguration[] Configurations = Globals.AllConfigurations;
|
||||
|
||||
/// <summary>
|
||||
/// The custom prefix for the target configuration. Null value indicates the project name as a prefix (or gathered from CustomExternalProjectFilePath).
|
||||
|
||||
@@ -31,16 +31,7 @@ namespace Flax.Deps
|
||||
var depsToBuild = string.IsNullOrEmpty(Configuration.DepsToBuild) ? new string[0] : Configuration.DepsToBuild.Trim().ToLower().Split(',');
|
||||
|
||||
// Pick platforms for build
|
||||
var platforms = new[]
|
||||
{
|
||||
TargetPlatform.Windows,
|
||||
TargetPlatform.UWP,
|
||||
TargetPlatform.XboxOne,
|
||||
TargetPlatform.Linux,
|
||||
TargetPlatform.PS4,
|
||||
TargetPlatform.XboxScarlett,
|
||||
TargetPlatform.Android,
|
||||
};
|
||||
var platforms = Globals.AllPlatforms;
|
||||
if (Configuration.BuildPlatforms != null && Configuration.BuildPlatforms.Length != 0)
|
||||
platforms = Configuration.BuildPlatforms;
|
||||
platforms = platforms.Where(x => buildPlatform.CanBuildPlatform(x)).ToArray();
|
||||
|
||||
@@ -21,5 +21,40 @@ namespace Flax.Build
|
||||
/// The project loaded from the workspace directory.
|
||||
/// </summary>
|
||||
public static ProjectInfo Project;
|
||||
|
||||
/// <summary>
|
||||
/// All platforms array.
|
||||
/// </summary>
|
||||
public static readonly TargetPlatform[] AllPlatforms =
|
||||
{
|
||||
TargetPlatform.Windows,
|
||||
TargetPlatform.UWP,
|
||||
TargetPlatform.XboxOne,
|
||||
TargetPlatform.Linux,
|
||||
TargetPlatform.PS4,
|
||||
TargetPlatform.XboxScarlett,
|
||||
TargetPlatform.Android,
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// All architectures array.
|
||||
/// </summary>
|
||||
public static readonly TargetArchitecture[] AllArchitectures =
|
||||
{
|
||||
TargetArchitecture.x64,
|
||||
TargetArchitecture.x86,
|
||||
TargetArchitecture.ARM,
|
||||
TargetArchitecture.ARM64,
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// All configurations array.
|
||||
/// </summary>
|
||||
public static readonly TargetConfiguration[] AllConfigurations =
|
||||
{
|
||||
TargetConfiguration.Debug,
|
||||
TargetConfiguration.Development,
|
||||
TargetConfiguration.Release,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user