Merge pull request #492 from suirad/fix-build

update build.zig for recent zig changes
This commit is contained in:
Auguste Rame 2022-05-28 14:19:41 -04:00 committed by GitHub
commit b9351ca722
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -22,8 +22,8 @@ pub fn build(b: *std.build.Builder) !void {
b.option(std.log.Level, "log_level", "The Log Level to be used.") orelse .info, b.option(std.log.Level, "log_level", "The Log Level to be used.") orelse .info,
); );
exe.addPackage(.{ .name = "known-folders", .path = .{ .path = "src/known-folders/known-folders.zig" } }); exe.addPackage(.{ .name = "known-folders", .source = .{ .path = "src/known-folders/known-folders.zig" } });
exe.addPackage(.{ .name = "zinput", .path = .{ .path = "src/zinput/src/main.zig" } }); exe.addPackage(.{ .name = "zinput", .source = .{ .path = "src/zinput/src/main.zig" } });
exe.setTarget(target); exe.setTarget(target);
exe.setBuildMode(mode); exe.setBuildMode(mode);
@ -39,7 +39,7 @@ pub fn build(b: *std.build.Builder) !void {
test_step.dependOn(&unit_tests.step); test_step.dependOn(&unit_tests.step);
var session_tests = b.addTest("tests/sessions.zig"); var session_tests = b.addTest("tests/sessions.zig");
session_tests.addPackage(.{ .name = "header", .path = .{ .path = "src/header.zig" } }); session_tests.addPackage(.{ .name = "header", .source = .{ .path = "src/header.zig" } });
session_tests.setBuildMode(.Debug); session_tests.setBuildMode(.Debug);
test_step.dependOn(&session_tests.step); test_step.dependOn(&session_tests.step);
} }