diff --git a/showcase/build.zig b/showcase/build.zig index 64734f9..8f6adce 100644 --- a/showcase/build.zig +++ b/showcase/build.zig @@ -7,7 +7,7 @@ const carts = .{ .{ "zeroman", @import("zeroman") }, .{ "blobs", @import("blobs") }, .{ "plasma", @import("plasma") }, - .{ "metalgear_timer", @import("metalgear_timer") }, + .{ "metalgear-timer", @import("metalgear-timer") }, .{ "raytracer", @import("raytracer") }, .{ "neopixelpuzzle", @import("neopixelpuzzle") }, .{ "dvd", @import("dvd") }, @@ -17,15 +17,24 @@ pub fn build(b: *std.Build) void { const optimize = b.standardOptimizeOption(.{}); inline for (carts) |cart| { - const cart_name = cart[0]; - const cart_import = cart[1]; + const cart_name, const cart_import = cart; _ = cart_import.author_name; if (@hasDecl(cart_import, "author_handle")) _ = cart_import.author_handle; _ = cart_import.cart_title; _ = cart_import.description; const dep = b.dependency(cart_name, .{ .optimize = optimize }); - b.getInstallStep().dependOn(dep.builder.getInstallStep()); + for (dep.builder.install_tls.step.dependencies.items) |dep_step| { + if (dep_step.cast(std.Build.Step.InstallArtifact)) |install_artifact| { + b.installArtifact(install_artifact.artifact); + } else if (dep_step.cast(std.Build.Step.InstallFile)) |install_file| { + b.getInstallStep().dependOn(&b.addInstallFileWithDir( + install_file.source, + install_file.dir, + install_file.dest_rel_path, + ).step); + } else unreachable; + } } //zine.addWebsite(b, .{ diff --git a/showcase/build.zig.zon b/showcase/build.zig.zon index a719727..b75a153 100644 --- a/showcase/build.zig.zon +++ b/showcase/build.zig.zon @@ -13,7 +13,7 @@ .zeroman = .{ .path = "carts/zeroman" }, .blobs = .{ .path = "carts/blobs" }, .plasma = .{ .path = "carts/plasma" }, - .metalgear_timer = .{ .path = "carts/metalgear-timer" }, + .@"metalgear-timer" = .{ .path = "carts/metalgear-timer" }, .raytracer = .{ .path = "carts/raytracer" }, .neopixelpuzzle = .{ .path = "carts/neopixelpuzzle" }, .dvd = .{ .path = "carts/dvd" },