Introduce pipeline, shader sketch
This commit is contained in:
22
build.zig
22
build.zig
@@ -21,6 +21,28 @@ pub fn build(b: *std.Build) void {
|
||||
|
||||
const target = b.standardTargetOptions(.{});
|
||||
const optimize = b.standardOptimizeOption(.{});
|
||||
const pipeline_debug = b.option(bool, "pipeline_debug", "Build asset pipeline in debug mode") orelse false;
|
||||
|
||||
const pipeline_mod = b.createModule(.{
|
||||
.root_source_file = b.path("pipeline/main.zig"),
|
||||
.target = b.graph.host,
|
||||
.optimize = if (pipeline_debug) .Debug else .ReleaseSafe,
|
||||
});
|
||||
|
||||
pipeline_mod.addImport("zstbi", zstbi.module("root"));
|
||||
|
||||
const pipeline = b.addExecutable(.{
|
||||
.name = "pipeline",
|
||||
.root_module = pipeline_mod,
|
||||
});
|
||||
|
||||
pipeline.linkLibrary(zstbi.artifact("zstbi"));
|
||||
|
||||
const pipeline_cmd = b.addRunArtifact(pipeline);
|
||||
pipeline_cmd.setCwd(b.path("."));
|
||||
|
||||
const pipeline_step = b.step("pipeline", "Run the asset pipeline");
|
||||
pipeline_step.dependOn(&pipeline_cmd.step);
|
||||
|
||||
const exe_mod = b.createModule(.{
|
||||
.root_source_file = b.path("src/main.zig"),
|
||||
|
||||
Reference in New Issue
Block a user