diff options
| author | Isaac Freund <ifreund@ifreund.xyz> | 2020-06-05 00:24:17 +0200 |
|---|---|---|
| committer | Isaac Freund <ifreund@ifreund.xyz> | 2020-06-05 00:24:46 +0200 |
| commit | 83d2a8be5f620f79065a8908afe9fddb43fdb0b4 (patch) | |
| tree | 57634de65c9887fea0c67c880773e32f9df69cfa /build.zig | |
| parent | 7a40ac370d9ebebaf53007e42619ff6dd0cd0244 (diff) | |
| download | river-83d2a8be5f620f79065a8908afe9fddb43fdb0b4.tar.gz river-83d2a8be5f620f79065a8908afe9fddb43fdb0b4.tar.xz | |
river-status: implement example client
Diffstat (limited to 'build.zig')
| -rw-r--r-- | build.zig | 20 |
1 files changed, 19 insertions, 1 deletions
@@ -17,6 +17,12 @@ pub fn build(b: *std.build.Builder) !void { "Set to true to enable xwayland support", ) orelse false; + const examples = b.option( + bool, + "examples", + "Set to true to build examples", + ) orelse false; + const scan_protocols = ScanProtocolsStep.create(b); { @@ -45,12 +51,24 @@ pub fn build(b: *std.build.Builder) !void { addProtocolDeps(riverctl, &scan_protocols.step); riverctl.linkLibC(); - riverctl.linkSystemLibrary("wayland-client"); riverctl.install(); } + if (examples) { + const status = b.addExecutable("status", "example/status.zig"); + status.setTarget(target); + status.setBuildMode(mode); + + addProtocolDeps(status, &scan_protocols.step); + + status.linkLibC(); + status.linkSystemLibrary("wayland-client"); + + status.install(); + } + { const river_test = b.addTest("river/test_main.zig"); river_test.setTarget(target); |
