Fix building deps for Windows ARM64
This commit is contained in:
@@ -36,7 +36,7 @@ public class Platform : EngineModule
|
||||
{
|
||||
options.OutputFiles.Add("dbghelp.lib");
|
||||
options.DelayLoadLibraries.Add("dbghelp.dll");
|
||||
options.DependencyFiles.Add(Path.Combine(options.DepsFolder, "dbghelp.dll"));
|
||||
options.OptionalDependencyFiles.Add(Path.Combine(options.DepsFolder, "dbghelp.dll"));
|
||||
}
|
||||
if (options.Target.IsEditor)
|
||||
{
|
||||
|
||||
@@ -134,6 +134,8 @@ namespace Flax.Deps.Dependencies
|
||||
case TargetPlatform.Windows:
|
||||
{
|
||||
cmakeArgs = ".. -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDLL " + cmakeArgs;
|
||||
if (architecture == TargetArchitecture.ARM64)
|
||||
cmakeArgs += " -DBASISU_SSE=OFF";
|
||||
RunCmake(buildDir, platform, architecture, cmakeArgs);
|
||||
BuildCmake(buildDir, configuration, options:Utilities.RunOptions.ConsoleLogOutput);
|
||||
CopyLib(platform, Path.Combine(buildDir, configuration), depsFolder, "basisu_encoder");
|
||||
|
||||
@@ -48,6 +48,9 @@ namespace Flax.Deps.Dependencies
|
||||
}
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override bool BuildByDefault => false;
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void Build(BuildOptions options)
|
||||
{
|
||||
|
||||
@@ -82,9 +82,19 @@ namespace Flax.Deps.Dependencies
|
||||
CloneGitRepoFast(root, "https://github.com/FlaxEngine/glslang.git");
|
||||
|
||||
// Setup the external sources
|
||||
// Requires distutils (pip install setuptools)
|
||||
bool canRetry = true;
|
||||
RETRY:
|
||||
if (Utilities.Run(BuildPlatform != TargetPlatform.Mac ? "python" : "python3", "update_glslang_sources.py", null, root, Utilities.RunOptions.ConsoleLogOutput) != 0)
|
||||
{
|
||||
if (canRetry)
|
||||
{
|
||||
// Requires distutils (pip install setuptools)
|
||||
canRetry = false;
|
||||
Utilities.Run("pip", "install setuptools", null, root, Utilities.RunOptions.ConsoleLogOutput);
|
||||
goto RETRY;
|
||||
}
|
||||
throw new Exception("Failed to update glslang sources, make sure setuptools python package is installed.");
|
||||
}
|
||||
|
||||
foreach (var platform in options.Platforms)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user