mirror of
https://github.com/MezzalunaWM/Mezzaluna.git
synced 2026-03-07 19:49:53 -05:00
add build time option to change where we look for the runtime directory
This commit is contained in:
parent
e3e7ecd7e1
commit
edd0956b25
1 changed files with 1 additions and 7 deletions
|
|
@ -7,13 +7,6 @@ pub fn build(b: *std.Build) void {
|
||||||
const target = b.standardTargetOptions(.{});
|
const target = b.standardTargetOptions(.{});
|
||||||
const optimize = b.standardOptimizeOption(.{});
|
const optimize = b.standardOptimizeOption(.{});
|
||||||
|
|
||||||
// TODO: this will probably change based on the install paths, make this a var
|
|
||||||
// that can be passed at comptime?
|
|
||||||
const runtime_path_prefix = switch (builtin.mode) {
|
|
||||||
.Debug => "runtime/",
|
|
||||||
else => "/usr/share",
|
|
||||||
};
|
|
||||||
|
|
||||||
// Add protocol xml files
|
// Add protocol xml files
|
||||||
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");
|
||||||
|
|
@ -79,6 +72,7 @@ pub fn build(b: *std.Build) void {
|
||||||
) catch "dev\n";
|
) catch "dev\n";
|
||||||
|
|
||||||
const options = b.addOptions();
|
const options = b.addOptions();
|
||||||
|
const runtime_path_prefix = b.option([]const u8, "prefix", "Where mez looks for the runtime dir") orelse "runtime/";
|
||||||
options.addOption([]const u8, "runtime_path_prefix", runtime_path_prefix);
|
options.addOption([]const u8, "runtime_path_prefix", runtime_path_prefix);
|
||||||
options.addOption([]const u8, "version", version);
|
options.addOption([]const u8, "version", version);
|
||||||
mez.root_module.addOptions("config", options);
|
mez.root_module.addOptions("config", options);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue