Skip to content

Commit

Permalink
Update buildscriopts. Add windows ARM64 support
Browse files Browse the repository at this point in the history
  • Loading branch information
dellis1972 committed Sep 3, 2024
1 parent 2eefe1b commit 78bbd75
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
13 changes: 11 additions & 2 deletions build/BuildWindowsTask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,22 @@ public sealed class BuildWindowsTask : FrostingTask<BuildContext>
public override void Run(BuildContext context)
{
// Build
var buildDir = "sdl/build";
var buildDir = "sdl/build_x64";
context.CreateDirectory(buildDir);
context.StartProcess("cmake", new ProcessSettings { WorkingDirectory = buildDir, Arguments = "-A x64 -D CMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded ../" });
context.StartProcess("msbuild", new ProcessSettings { WorkingDirectory = buildDir, Arguments = "SDL2.sln /p:Configuration=Release" });

// Copy artifact
context.CreateDirectory(context.ArtifactsDir);
context.CopyFile("sdl/build/Release/SDL2.dll", $"{context.ArtifactsDir}/SDL2.dll");
context.CopyFile("sdl/build_x64/Release/SDL2.dll", $"{context.ArtifactsDir}/win-x64/SDL2.dll");

buildDir = "sdl/build_arm64";
context.CreateDirectory(buildDir);
context.StartProcess("cmake", new ProcessSettings { WorkingDirectory = buildDir, Arguments = "-A ARM64 -D CMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded ../" });
context.StartProcess("msbuild", new ProcessSettings { WorkingDirectory = buildDir, Arguments = "SDL2.sln /p:Configuration=Release" });

// Copy artifact
context.CreateDirectory(context.ArtifactsDir);
context.CopyFile("sdl/build_arm64/Release/SDL2.dll", $"{context.ArtifactsDir}/win-arm64/SDL2.dll");
}
}

0 comments on commit 78bbd75

Please sign in to comment.