mirror of
https://github.com/MezzalunaWM/Mezzaluna.git
synced 2026-03-07 19:49:53 -05:00
cleanup build.zig
This commit is contained in:
parent
e4fa0c4521
commit
e81334cf45
1 changed files with 7 additions and 11 deletions
18
build.zig
18
build.zig
|
|
@ -14,12 +14,7 @@ pub fn build(b: *std.Build) void {
|
||||||
else => "/usr/share",
|
else => "/usr/share",
|
||||||
};
|
};
|
||||||
|
|
||||||
// If instead your goal is to create an executable, consider if users might
|
// Add protocol xml files
|
||||||
// be interested in also being able to embed the core functionality of your
|
|
||||||
// program in their own executable in order to avoid the overhead involved in
|
|
||||||
// subprocessing your CLI tool.
|
|
||||||
|
|
||||||
// The below is copied from tinywl
|
|
||||||
const scanner = Scanner.create(b, .{});
|
const scanner = Scanner.create(b, .{});
|
||||||
scanner.addSystemProtocol("stable/xdg-shell/xdg-shell.xml");
|
scanner.addSystemProtocol("stable/xdg-shell/xdg-shell.xml");
|
||||||
scanner.addSystemProtocol("stable/tablet/tablet-v2.xml");
|
scanner.addSystemProtocol("stable/tablet/tablet-v2.xml");
|
||||||
|
|
@ -27,6 +22,7 @@ pub fn build(b: *std.Build) void {
|
||||||
scanner.addCustomProtocol(b.path("protocols/wlr-layer-shell-unstable-v1.xml"));
|
scanner.addCustomProtocol(b.path("protocols/wlr-layer-shell-unstable-v1.xml"));
|
||||||
scanner.addCustomProtocol(b.path("protocols/mez-remote-lua-unstable-v1.xml"));
|
scanner.addCustomProtocol(b.path("protocols/mez-remote-lua-unstable-v1.xml"));
|
||||||
|
|
||||||
|
// Generate protocol code
|
||||||
scanner.generate("zmez_remote_lua_manager_v1", 1);
|
scanner.generate("zmez_remote_lua_manager_v1", 1);
|
||||||
scanner.generate("wl_compositor", 6);
|
scanner.generate("wl_compositor", 6);
|
||||||
scanner.generate("wl_subcompositor", 1);
|
scanner.generate("wl_subcompositor", 1);
|
||||||
|
|
@ -62,7 +58,7 @@ pub fn build(b: *std.Build) void {
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
|
|
||||||
mez.linkLibC();
|
mez.root_module.link_libc = true;
|
||||||
|
|
||||||
mez.root_module.addImport("wayland", wayland);
|
mez.root_module.addImport("wayland", wayland);
|
||||||
mez.root_module.addImport("xkbcommon", xkbcommon);
|
mez.root_module.addImport("xkbcommon", xkbcommon);
|
||||||
|
|
@ -70,10 +66,10 @@ pub fn build(b: *std.Build) void {
|
||||||
mez.root_module.addImport("zlua", zlua);
|
mez.root_module.addImport("zlua", zlua);
|
||||||
mez.root_module.addImport("clap", clap);
|
mez.root_module.addImport("clap", clap);
|
||||||
|
|
||||||
mez.linkSystemLibrary("wayland-server");
|
mez.root_module.linkSystemLibrary("wayland-server", .{});
|
||||||
mez.linkSystemLibrary("xkbcommon");
|
mez.root_module.linkSystemLibrary("xkbcommon", .{});
|
||||||
mez.linkSystemLibrary("pixman-1");
|
mez.root_module.linkSystemLibrary("pixman-1", .{});
|
||||||
mez.linkSystemLibrary("libevdev");
|
mez.root_module.linkSystemLibrary("libevdev", .{});
|
||||||
|
|
||||||
var ret: u8 = undefined;
|
var ret: u8 = undefined;
|
||||||
const version = b.runAllowFail(
|
const version = b.runAllowFail(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue