summaryrefslogtreecommitdiff
path: root/build.zig
diff options
context:
space:
mode:
Diffstat (limited to 'build.zig')
-rw-r--r--build.zig16
1 files changed, 8 insertions, 8 deletions
diff --git a/build.zig b/build.zig
index a3df919f..bad4e466 100644
--- a/build.zig
+++ b/build.zig
@@ -161,7 +161,7 @@ pub fn build(b: *std.Build) void {
const tracy = b.option([]const u8, "tracy", "enable Tracy profiling; supply the path to a Tracy source checkout");
const macos_sdk = b.option([]const u8, "macos-sdk", "the macOS SDK a gui built for macOS from another system takes SDL's headers and frameworks from");
const macos_identity = b.option([]const u8, "macos-identity", "codesigning identity for pardes.app (default: ad-hoc)") orelse "-";
- const prebuilt_shaders = b.option(bool, "prebuilt-shaders", "embed sketchbook's committed src/gpu/shaders/prebuilt/*.spv instead of running glslc over its GLSL (default: on for a bare `zig build`, off when -Dplatform names a shell)") orelse also_gui;
+ const prebuilt_shaders = b.option(bool, "prebuilt-shaders", "embed sketchbook's committed dev/draw/shaders/prebuilt/*.spv instead of running glslc over its GLSL (default: on for a bare `zig build`, off when -Dplatform names a shell)") orelse also_gui;
const mupdf_check = b.step("mupdf-check", "the pdf addon's check: MuPDF compiles, links, renders and searches docs/design.pdf, and its script runs");
const pdf_pointer_bench_step = b.step("pdf-pointer-bench", "time PDF hover and selection gestures and prove their pixels (-Doptimize=ReleaseFast -- [--label L] [--reps N] [--path FILE] [--cell WxH])");
@@ -863,27 +863,27 @@ pub fn build(b: *std.Build) void {
font_c = gui_c_mod;
gm.addImport("gui_c", gui_c_mod);
if (b.lazyDependency("sketchbook", .{ .@"gpu-only" = true })) |sb| {
- const gpu = b.createModule(.{ .root_source_file = sb.path("src/gpu/Executor.zig"), .imports = &.{ .{ .name = "abi", .module = sb.module("abi") }, .{ .name = "c", .module = gui_c_mod } } });
+ const gpu = b.createModule(.{ .root_source_file = sb.path("dev/draw/Executor.zig"), .imports = &.{ .{ .name = "abi", .module = sb.module("abi") }, .{ .name = "c", .module = gui_c_mod } } });
gm.addImport("sketch_gpu", gpu);
// The glyph atlas (src/font/Atlas.zig) over the font shim
// (vendor/font.{c,h}), compiled below against pardes's
// FreeType and HarfBuzz.
const atlas_mod = b.createModule(.{ .root_source_file = sb.path("src/font/Atlas.zig"), .imports = &.{.{ .name = "c", .module = gui_c_mod }} });
gm.addImport("font_atlas", atlas_mod);
- // pardes's renderer, moved to sketchbook (src/gpu/), compiled
+ // pardes's renderer, moved to sketchbook (dev/draw/), compiled
// against pardes's SDL; its tests run with unit-test. Its
// SPIR-V is sketchbook's GLSL through glslc, or the prebuilt
// copies with -Dprebuilt-shaders.
- const cells_mod = b.createModule(.{ .root_source_file = sb.path("src/gpu/Cells.zig"), .imports = &.{ .{ .name = "c", .module = gui_c_mod }, .{ .name = "font_atlas", .module = atlas_mod } } });
+ const cells_mod = b.createModule(.{ .root_source_file = sb.path("dev/draw/Cells.zig"), .imports = &.{ .{ .name = "c", .module = gui_c_mod }, .{ .name = "font_atlas", .module = atlas_mod } } });
for (gui_shaders) |name| cells_mod.addAnonymousImport(b.fmt("{s}.spv", .{name}), .{
.root_source_file = if (prebuilt_shaders)
- sb.path(b.fmt("src/gpu/shaders/prebuilt/{s}.spv", .{name}))
+ sb.path(b.fmt("dev/draw/shaders/prebuilt/{s}.spv", .{name}))
else
- compileGlsl(b, sb.path(b.fmt("src/gpu/shaders/{s}.glsl", .{name})), name),
+ compileGlsl(b, sb.path(b.fmt("dev/draw/shaders/{s}.glsl", .{name})), name),
});
gm.addImport("gpu_cells", cells_mod);
- gm.addImport("gpu_present", b.createModule(.{ .root_source_file = sb.path("src/gpu/Present.zig"), .imports = &.{ .{ .name = "c", .module = gui_c_mod }, .{ .name = "gpu_cells", .module = cells_mod } } }));
- if (cells_test == null) cells_test = b.addTest(.{ .root_module = b.createModule(.{ .root_source_file = sb.path("src/gpu/Cells.zig"), .target = target, .optimize = optimize, .imports = &.{ .{ .name = "c", .module = gui_c_mod }, .{ .name = "font_atlas", .module = atlas_mod } } }), .filters = test_filters });
+ gm.addImport("gpu_present", b.createModule(.{ .root_source_file = sb.path("dev/draw/Present.zig"), .imports = &.{ .{ .name = "c", .module = gui_c_mod }, .{ .name = "gpu_cells", .module = cells_mod } } }));
+ if (cells_test == null) cells_test = b.addTest(.{ .root_module = b.createModule(.{ .root_source_file = sb.path("dev/draw/Cells.zig"), .target = target, .optimize = optimize, .imports = &.{ .{ .name = "c", .module = gui_c_mod }, .{ .name = "font_atlas", .module = atlas_mod } } }), .filters = test_filters });
gui_c.addIncludePath(sb.path("vendor"));
gm.addImport("gpu_scene", sb.module("gpu_scene"));
}