Use VS2022 Win10 MSVC solutions in DirectX-related dependencies

This commit is contained in:
2024-05-09 20:30:24 +03:00
parent 24c645d8d2
commit c8f951e6e8
8 changed files with 385 additions and 212 deletions

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
using System.IO;
using Flax.Build;
@@ -32,14 +32,14 @@ namespace Flax.Deps.Dependencies
public override void Build(BuildOptions options)
{
var root = options.IntermediateFolder;
var solutionPath = Path.Combine(root, "DirectXMesh_Desktop_2015.sln");
var solutionPath = Path.Combine(root, "DirectXMesh_Desktop_2022_Win10.sln");
var configuration = "Release";
var outputFileNames = new[]
{
"DirectXMesh.lib",
"DirectXMesh.pdb",
};
var binFolder = Path.Combine(root, "DirectXMesh", "Bin", "Desktop_2015");
var binFolder = Path.Combine(root, "DirectXMesh", "Bin", "Desktop_2022_Win10");
// Get the source
CloneGitRepoFast(root, "https://github.com/Microsoft/DirectXMesh.git");
@@ -50,14 +50,15 @@ namespace Flax.Deps.Dependencies
{
case TargetPlatform.Windows:
{
// Build for Win64
Deploy.VCEnvironment.BuildSolution(solutionPath, configuration, "x64");
var depsFolder = GetThirdPartyFolder(options, TargetPlatform.Windows, TargetArchitecture.x64);
foreach (var file in outputFileNames)
foreach (var architecture in new[] { TargetArchitecture.x64, TargetArchitecture.ARM64 })
{
Utilities.FileCopy(Path.Combine(binFolder, "x64", "Release", file), Path.Combine(depsFolder, file));
Deploy.VCEnvironment.BuildSolution(solutionPath, configuration, architecture.ToString());
var depsFolder = GetThirdPartyFolder(options, TargetPlatform.Windows, architecture);
foreach (var file in outputFileNames)
{
Utilities.FileCopy(Path.Combine(binFolder, architecture.ToString(), "Release", file), Path.Combine(depsFolder, file));
}
}
break;
}
}