summaryrefslogtreecommitdiff
path: root/build/gui.zig
diff options
context:
space:
mode:
Diffstat (limited to 'build/gui.zig')
-rw-r--r--build/gui.zig20
1 files changed, 10 insertions, 10 deletions
diff --git a/build/gui.zig b/build/gui.zig
index 9b46f6c5..24aa6277 100644
--- a/build/gui.zig
+++ b/build/gui.zig
@@ -94,25 +94,25 @@ pub fn make(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.lang.
const gui_c_mod = gui_c.createModule();
var sdl: Window.Sdl = .{ .lib = sdl_lib, .include = dep.path("include"), .gui_c = gui_c_mod };
if (sketchbook) |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 } } });
- // The glyph atlas (src/font/Atlas.zig) over the font shim
+ 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 } } });
+ // The glyph atlas (dev/text/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 }} });
- // pardes's renderer, moved to sketchbook (src/gpu/), compiled
+ const atlas_mod = b.createModule(.{ .root_source_file = sb.path("dev/text/Atlas.zig"), .imports = &.{.{ .name = "c", .module = gui_c_mod }} });
+ // 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),
});
- const 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 } } });
+ const 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 } } });
sdl.renderer = .{ .{ .name = "sketch_gpu", .module = gpu }, .{ .name = "font_atlas", .module = atlas_mod }, .{ .name = "gpu_cells", .module = cells_mod }, .{ .name = "gpu_present", .module = present }, .{ .name = "gpu_scene", .module = sb.module("gpu_scene") } };
- w.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 });
+ w.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"));
}
if (target.result.os.tag == .macos) {
@@ -169,7 +169,7 @@ pub fn make(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.lang.
// The Atlas's own tests, over the same FreeType, HarfBuzz and
// shim, the embedded face theirs to draw.
if (w.sdl) |sdl| if (sketchbook) |sb| {
- const atlas_mod = b.createModule(.{ .root_source_file = sb.path("src/font/Atlas.zig"), .target = target, .optimize = optimize, .link_libc = true, .imports = &.{.{ .name = "c", .module = sdl.gui_c }} });
+ const atlas_mod = b.createModule(.{ .root_source_file = sb.path("dev/text/Atlas.zig"), .target = target, .optimize = optimize, .link_libc = true, .imports = &.{.{ .name = "c", .module = sdl.gui_c }} });
atlas_mod.linkLibrary(ft);
atlas_mod.linkLibrary(harfbuzz);
atlas_mod.addIncludePath(upstream.path("src"));