compat: support latest zig, vulkan-zig
This commit is contained in:
21
build.zig
21
build.zig
@@ -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,
|
||||
});
|
||||
|
Reference in New Issue
Block a user