1
0
forked from mirror/vulkan-zig

update build to use new build API

This commit is contained in:
avokadoen
2023-02-07 21:51:46 +01:00
parent 782d75ac4c
commit b09e14a649
4 changed files with 21 additions and 17 deletions

View File

@@ -96,9 +96,11 @@ pub const ShaderCompileStep = struct {
return self;
}
/// Returns the shaders package with name `package_name`.
pub fn getPackage(self: *ShaderCompileStep, package_name: []const u8) std.build.Pkg {
return .{ .name = package_name, .source = self.getSource() };
/// Returns the shaders module with name.
pub fn getModule(self: *ShaderCompileStep) *std.build.Module {
return self.b.createModule(.{
.source_file = self.getSource(),
});
}
/// Returns the file source for the generated shader resource code.