Add support for building dependencies with specific architecture

This commit is contained in:
2025-10-18 02:33:22 +03:00
parent 44b2db5d5d
commit 078485892f
24 changed files with 1364 additions and 808 deletions

View File

@@ -40,6 +40,11 @@ namespace Flax.Deps
/// The target platforms to build dependency for (contains only platforms supported by the dependency itself).
/// </summary>
public TargetPlatform[] Platforms;
/// <summary>
/// The target architectures to build dependency for (contains only platforms supported by the dependency itself).
/// </summary>
public TargetArchitecture[] Architectures;
}
/// <summary>
@@ -70,6 +75,11 @@ namespace Flax.Deps
/// </summary>
public abstract TargetPlatform[] Platforms { get; }
/// <summary>
/// Gets the architectures list supported by this dependency to build on the current build platform (based on <see cref="Platform.BuildPlatform"/>).
/// </summary>
public abstract TargetArchitecture[] Architectures { get; }
/// <summary>
/// True if build dependency by default, otherwise only when explicitly specified via command line.
/// </summary>
@@ -85,9 +95,9 @@ namespace Flax.Deps
/// Logs build process start.
/// </summary>
/// <param name="platform">Target platform.</param>
protected void BuildStarted(TargetPlatform platform)
protected void BuildStarted(TargetPlatform platform, TargetArchitecture architecture)
{
Log.Info($"Building {GetType().Name} for {platform}");
Log.Info($"Building {GetType().Name} for {platform}{(architecture != TargetArchitecture.AnyCPU ? $" ({architecture})" : "")}");
}
/// <summary>