From 28f489eb56fa017481fec7a8d9c624174bb5af57 Mon Sep 17 00:00:00 2001 From: Matt Knight Date: Thu, 16 May 2024 18:15:11 -0700 Subject: [PATCH] commit build.zig and zon --- showcase/build.zig | 33 +++++++++++++++++++++++++++++++++ showcase/build.zig.zon | 22 ++++++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 showcase/build.zig create mode 100644 showcase/build.zig.zon diff --git a/showcase/build.zig b/showcase/build.zig new file mode 100644 index 0000000..fb11247 --- /dev/null +++ b/showcase/build.zig @@ -0,0 +1,33 @@ +const std = @import("std"); +//const zine = @import("zine"); + +const root = @import("root"); +// cart imports +const carts = .{ + .{ "zeroman", @import("zeroman") }, + //.{ "blobs", @import("blobs") }, +}; + +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]; + _ = 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()); + } + + //zine.addWebsite(b, .{ + // .title = "SYCL Badge Showcase", + // .host_url = "https://sample.com", + // .layouts_dir_path = "layouts", + // .content_dir_path = "content", + // .static_dir_path = "static", + //}) catch unreachable; +} diff --git a/showcase/build.zig.zon b/showcase/build.zig.zon new file mode 100644 index 0000000..8872b81 --- /dev/null +++ b/showcase/build.zig.zon @@ -0,0 +1,22 @@ +.{ + .name = "sycl-badge/showcase", + .version = "0.0.0", + .dependencies = .{ + .sycl_badge = .{ + .path = "..", + }, + //.zine = .{ + // .path = "../../zine", + //}, + + // Carts go here + .zeroman = .{ .path = "carts/zeroman" }, + .blobs = .{ .path = "carts/blobs" }, + }, + .paths = .{ + "README.md", + "build.zig.zon", + "build.zig", + "carts", + }, +}