compat: support latest zig, vulkan-zig

This commit is contained in:
David Allemang
2024-06-05 16:04:50 -04:00
parent f3c94fbdfa
commit f58107ad77
7 changed files with 42 additions and 114 deletions

View File

@@ -13,7 +13,7 @@ pub fn build(b: *std.Build) void {
const exe = b.addExecutable(.{
.name = "scratchzig",
.root_source_file = .{ .path = "src/main.zig" },
.root_source_file = b.path("src/main.zig"),
.target = target,
.optimize = optimize,
});
@@ -39,19 +39,6 @@ pub fn build(b: *std.Build) void {
b.installArtifact(exe);
var docs_dir: std.Build.GeneratedFile = .{
.path = "docs",
.step = &exe.step,
};
exe.generated_docs = &docs_dir;
const docs = b.addInstallDirectory(.{
.source_dir = .{ .generated = &docs_dir },
.install_dir = .{ .custom = "docs" },
.install_subdir = "",
});
const docs_step = b.step("docs", "Build the docs");
docs_step.dependOn(&docs.step);
const run_cmd = b.addRunArtifact(exe);
run_cmd.step.dependOn(b.getInstallStep());
@@ -63,7 +50,7 @@ pub fn build(b: *std.Build) void {
run_step.dependOn(&run_cmd.step);
const exe_unit_tests = b.addTest(.{
.root_source_file = .{ .path = "src/main.zig" },
.root_source_file = b.path("src/main.zig"),
.target = target,
.optimize = optimize,
});
@@ -77,7 +64,7 @@ pub fn build(b: *std.Build) void {
const dsa_unit_tests = b.addTest(.{
.name = "dsa.zig tests",
.root_source_file = .{ .path = "src/dsa.zig" },
.root_source_file = b.path("src/dsa.zig"),
.target = target,
.optimize = optimize,
});
@@ -89,7 +76,7 @@ pub fn build(b: *std.Build) void {
const inspect = b.addExecutable(.{
.name = "vkinspect",
.root_source_file = .{ .path = "src/inspect.zig" },
.root_source_file = b.path("src/inspect.zig"),
.target = target,
.optimize = optimize,
});