diff options
| author | Isaac Freund <ifreund@ifreund.xyz> | 2021-01-15 19:54:19 +0100 |
|---|---|---|
| committer | Isaac Freund <ifreund@ifreund.xyz> | 2021-01-16 23:51:15 +0100 |
| commit | 8cbccbfb6e377d6e12b951a0713ef5eb3dcdc2b6 (patch) | |
| tree | b985779b098f8f7d90744b4652352686c6f0d82d /build.zig | |
| parent | 875e3c325d133c6cc67e980b8eb080faefb3d35d (diff) | |
| download | river-8cbccbfb6e377d6e12b951a0713ef5eb3dcdc2b6.tar.gz river-8cbccbfb6e377d6e12b951a0713ef5eb3dcdc2b6.tar.xz | |
river-options: implement
Diffstat (limited to 'build.zig')
| -rw-r--r-- | build.zig | 21 |
1 files changed, 12 insertions, 9 deletions
@@ -41,6 +41,7 @@ pub fn build(b: *zbs.Builder) !void { const scanner = ScanProtocolsStep.create(b); scanner.addSystemProtocol("stable/xdg-shell/xdg-shell.xml"); scanner.addProtocolPath("protocol/river-control-unstable-v1.xml"); + scanner.addProtocolPath("protocol/river-options-unstable-v1.xml"); scanner.addProtocolPath("protocol/river-status-unstable-v1.xml"); scanner.addProtocolPath("protocol/wlr-layer-shell-unstable-v1.xml"); scanner.addProtocolPath("protocol/wlr-output-power-management-unstable-v1.xml"); @@ -85,18 +86,20 @@ pub fn build(b: *zbs.Builder) !void { } if (examples) { - const status = b.addExecutable("status", "example/status.zig"); - status.setTarget(target); - status.setBuildMode(mode); + inline for (.{ "status", "options" }) |example_name| { + const example = b.addExecutable(example_name, "example/" ++ example_name ++ ".zig"); + example.setTarget(target); + example.setBuildMode(mode); - status.step.dependOn(&scanner.step); - status.addPackage(scanner.getPkg()); - status.linkLibC(); - status.linkSystemLibrary("wayland-client"); + example.step.dependOn(&scanner.step); + example.addPackage(scanner.getPkg()); + example.linkLibC(); + example.linkSystemLibrary("wayland-client"); - scanner.addCSource(status); + scanner.addCSource(example); - status.install(); + example.install(); + } } { |
