Add ability to pass a LazyPath to ShaderCompileStep

Allows for executables generated by the
build system to be used as shader compilers.
This commit is contained in:
antlilja
2024-07-09 12:30:18 +02:00
parent 66b7b773bb
commit c2e755d934
2 changed files with 29 additions and 7 deletions

View File

@@ -35,7 +35,8 @@ pub fn build(b: *std.Build) void {
const shaders = ShaderCompileStep.create(
b,
&[_][]const u8{ "glslc", "--target-env=vulkan1.2" },
.{ .real_path = "glslc" },
&[_][]const u8{"--target-env=vulkan1.2"},
"-o",
);
shaders.add("triangle_vert", "shaders/triangle.vert", .{});