river-status: implement example client
This commit is contained in:
20
build.zig
20
build.zig
@ -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);
|
||||
|
Reference in New Issue
Block a user