core: libmachcore fixes

This commit is contained in:
Andrew Gutekanst 2023-02-07 20:08:35 -05:00 committed by Stephen Gutekanst
parent 35ae2d7ac7
commit 60eb518e4f
5 changed files with 89 additions and 10 deletions

View file

@ -19,13 +19,16 @@ pub fn Sdk(comptime deps: anytype) type {
}
};
pub fn testStep(b: *std.build.Builder, mode: std.builtin.Mode, target: std.zig.CrossTarget) *std.build.RunStep {
pub fn testStep(b: *std.build.Builder, mode: std.builtin.Mode, target: std.zig.CrossTarget) !*std.build.RunStep {
const main_tests = b.addTestExe("core-tests", "src/main.zig");
main_tests.setBuildMode(mode);
main_tests.setTarget(target);
for (pkg.dependencies.?) |dependency| {
main_tests.addPackage(dependency);
}
main_tests.addPackage(deps.glfw.pkg);
try deps.glfw.link(b, main_tests, .{});
main_tests.addIncludePath(sdkPath("/include"));
main_tests.install();
return main_tests.run();
}