forked from mirror/vulkan-zig
move generator/ to src/
A long time ago there was the idea to use src/ for something else, but that is no longer relevant. Its nice to switch to a more conventional repo layout.
This commit is contained in:
@@ -34,7 +34,7 @@ NOTE: you need to replace `path/to/vk.xml` with the spec path from whatever sour
|
|||||||
### Generation from build.zig
|
### Generation from build.zig
|
||||||
Vulkan bindings can be generated from the Vulkan XML registry at compile time with build.zig, by using the provided Vulkan generation step:
|
Vulkan bindings can be generated from the Vulkan XML registry at compile time with build.zig, by using the provided Vulkan generation step:
|
||||||
```zig
|
```zig
|
||||||
const vkgen = @import("vulkan-zig/generator/index.zig");
|
const vkgen = @import("vulkan-zig/src/index.zig");
|
||||||
|
|
||||||
pub fn build(b: *Builder) void {
|
pub fn build(b: *Builder) void {
|
||||||
...
|
...
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
const vkgen = @import("generator/index.zig");
|
const vkgen = @import("src/index.zig");
|
||||||
|
|
||||||
pub const ShaderCompileStep = vkgen.ShaderCompileStep;
|
pub const ShaderCompileStep = vkgen.ShaderCompileStep;
|
||||||
pub const VkGenerateStep = vkgen.VkGenerateStep;
|
pub const VkGenerateStep = vkgen.VkGenerateStep;
|
||||||
@@ -15,7 +15,7 @@ pub fn build(b: *std.Build) void {
|
|||||||
// a file source to the generated code with `.addOutputArg("vk.zig")`
|
// a file source to the generated code with `.addOutputArg("vk.zig")`
|
||||||
const generator_exe = b.addExecutable(.{
|
const generator_exe = b.addExecutable(.{
|
||||||
.name = "generator",
|
.name = "generator",
|
||||||
.root_source_file = .{ .path = "generator/main.zig" },
|
.root_source_file = .{ .path = "src/main.zig" },
|
||||||
.target = target,
|
.target = target,
|
||||||
.optimize = optimize,
|
.optimize = optimize,
|
||||||
});
|
});
|
||||||
@@ -69,7 +69,7 @@ pub fn build(b: *std.Build) void {
|
|||||||
triangle_run_step.dependOn(&triangle_run_cmd.step);
|
triangle_run_step.dependOn(&triangle_run_cmd.step);
|
||||||
|
|
||||||
const test_target = b.addTest(.{
|
const test_target = b.addTest(.{
|
||||||
.root_source_file = .{ .path = "generator/index.zig" },
|
.root_source_file = .{ .path = "src/index.zig" },
|
||||||
});
|
});
|
||||||
|
|
||||||
const run_test = b.addRunArtifact(test_target);
|
const run_test = b.addRunArtifact(test_target);
|
||||||
|
|||||||
Reference in New Issue
Block a user