Introduce "Enumeration" type for vk.enumerate* results

This commit is contained in:
David Allemang
2024-03-22 15:59:20 -04:00
parent 9001ee42ac
commit 2403befc0e
3 changed files with 114 additions and 79 deletions

View File

@@ -25,12 +25,24 @@ pub fn build(b: *std.Build) void {
.use_pkg_config = .force,
});
exe.linkLibC();
b.installArtifact(exe);
exe.root_module.addImport("vk", vkmod);
const run_cmd = b.addRunArtifact(exe);
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());
if (b.args) |args| {
@@ -45,6 +57,12 @@ pub fn build(b: *std.Build) void {
.target = target,
.optimize = optimize,
});
exe_unit_tests.linkSystemLibrary2("glfw3", .{
.needed = true,
.preferred_link_mode = .static,
.use_pkg_config = .force,
});
exe_unit_tests.linkLibC();
const run_exe_unit_tests = b.addRunArtifact(exe_unit_tests);