git.lucas.co / cce-compositor
Wayland compositor (wlroots)
git clone https://git.lucas.co/cce-compositor.git

commitb7ba22437fec3e104eb94bce52b59dcecd75289b
parentca192e5739
authorIsaac Freund <[email protected]>
date2020-05-04 11:10
Add xwayland build option

 build.zig | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/build.zig b/build.zig
index 74ac270..54597d3 100644
--- a/build.zig
+++ b/build.zig
@@ -11,11 +11,18 @@ pub fn build(b: *std.build.Builder) !void {
     // between Debug, ReleaseSafe, ReleaseFast, and ReleaseSmall.
     const mode = b.standardReleaseOptions();
 
+    const xwayland = b.option(
+        bool,
+        "xwayland",
+        "Set to true to enable xwayland support",
+    ) orelse false;
+
     const scan_protocols = ScanProtocolsStep.create(b);
 
     const exe = b.addExecutable("river", "src/main.zig");
     exe.setTarget(target);
     exe.setBuildMode(mode);
+    exe.addBuildOption(bool, "xwayland", xwayland);
     addDeps(exe, &scan_protocols.step);
     exe.install();
 
@@ -28,6 +35,7 @@ pub fn build(b: *std.build.Builder) !void {
     const test_exe = b.addTest("src/test_main.zig");
     test_exe.setTarget(target);
     test_exe.setBuildMode(mode);
+    test_exe.addBuildOption(bool, "xwayland", xwayland);
     addDeps(test_exe, &scan_protocols.step);
 
     const test_step = b.step("test", "Run the tests");