Skip to content

Commit 3edd2ad

Browse files
committed
expose wayland.xml and wayland.dtd
1 parent 0dc931e commit 3edd2ad

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

build.zig

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,17 @@ pub fn build(b: *std.Build) void {
318318
.flags = cc_flags,
319319
});
320320
}
321+
322+
const added_named_lazy_path_version = comptime std.SemanticVersion.parse("0.14.0-dev.1576+5d7fa5513") catch unreachable;
323+
324+
if (comptime @import("builtin").zig_version.order(added_named_lazy_path_version) != .lt) {
325+
b.addNamedLazyPath("wayland-xml", upstream.path("protocol/wayland.xml"));
326+
b.addNamedLazyPath("wayland.dtd", upstream.path("protocol/wayland.dtd"));
327+
}
328+
329+
const protocol = b.addNamedWriteFiles("protocol");
330+
_ = protocol.addCopyFile(upstream.path("protocol/wayland.xml"), "wayland.xml");
331+
_ = protocol.addCopyFile(upstream.path("protocol/wayland.dtd"), "wayland.dtd");
321332
}
322333

323334
fn createWaylandUtil(

0 commit comments

Comments
 (0)