Add option to link OpenMP on GDK platforms if needed

This commit is contained in:
Wojtek Figat
2025-11-14 02:11:13 -08:00
parent 5e690abd76
commit 2a36edf528

View File

@@ -13,6 +13,11 @@ namespace Flax.Build.Platforms
/// <seealso cref="Flax.Build.Platforms.WindowsToolchainBase" />
public abstract class GDKToolchain : WindowsToolchainBase
{
/// <summary>
/// Enables OpenMP library as dynamic dependency.
/// </summary>
protected bool OpenMP = false;
/// <summary>
/// Gets the version of Xbox Services toolset.
/// </summary>
@@ -74,6 +79,12 @@ namespace Flax.Build.Platforms
options.DependencyFiles.Add(Path.Combine(redistToolsPath, "vccorlib140.dll"));
options.DependencyFiles.Add(Path.Combine(redistToolsPath, "vcruntime140.dll"));
options.DependencyFiles.Add(Path.Combine(redistToolsPath, "vcruntime140_1.dll"));
if (OpenMP)
{
redistToolsPath = Path.Combine(paths[0], "x64", "Microsoft.VC" + (int)crtToolset + ".OpenMP");
redistToolsPath = Utilities.RemovePathRelativeParts(redistToolsPath);
options.DependencyFiles.Add(Path.Combine(redistToolsPath, "vcomp140.dll"));
}
}
}
}