forked from mirror/vulkan-zig
accept registry option as LazyPath
This allows passing LazyPaths obtained from dependencies to the vulkan-zig dependency, which streamlines using vulkan-zig with Vulkan-Headers provided by the package manager.
This commit is contained in:
@@ -3,7 +3,7 @@ const std = @import("std");
|
||||
pub fn build(b: *std.Build) void {
|
||||
const target = b.standardTargetOptions(.{});
|
||||
const optimize = b.standardOptimizeOption(.{});
|
||||
const maybe_registry: ?[]const u8 = b.option([]const u8, "registry", "Set the path to the Vulkan registry (vk.xml)");
|
||||
const maybe_registry = b.option(std.Build.LazyPath, "registry", "Set the path to the Vulkan registry (vk.xml)");
|
||||
const test_step = b.step("test", "Run all the tests");
|
||||
|
||||
// Using the package manager, this artifact can be obtained by the user
|
||||
@@ -23,7 +23,7 @@ pub fn build(b: *std.Build) void {
|
||||
if (maybe_registry) |registry| {
|
||||
const vk_generate_cmd = b.addRunArtifact(generator_exe);
|
||||
|
||||
vk_generate_cmd.addArg(registry);
|
||||
vk_generate_cmd.addFileArg(registry);
|
||||
|
||||
const vk_zig = vk_generate_cmd.addOutputFileArg("vk.zig");
|
||||
const vk_zig_module = b.addModule("vulkan-zig", .{
|
||||
|
||||
Reference in New Issue
Block a user