can now use -Dfont-backend to choose the font backend to use

This commit is contained in:
Mitchell Hashimoto
2023-03-04 10:50:13 -08:00
parent 4e31f14f7b
commit 06035e2f95
4 changed files with 79 additions and 45 deletions

View File

@@ -7,6 +7,7 @@ const builtin = @import("builtin");
const options = @import("build_options");
const assert = std.debug.assert;
const apprt = @import("apprt.zig");
const font = @import("font/main.zig");
/// The artifact we're producing. This can be used to determine if we're
/// building a standalone exe, an embedded lib, etc.
@@ -18,6 +19,12 @@ pub const app_runtime: apprt.Runtime = switch (artifact) {
else => std.meta.stringToEnum(apprt.Runtime, std.meta.tagName(options.app_runtime)).?,
};
/// The font backend desired for the build.
pub const font_backend: font.Backend = std.meta.stringToEnum(
font.Backend,
std.meta.tagName(options.font_backend),
).?;
/// Whether our devmode UI is enabled or not. This requires imgui to be
/// compiled.
pub const devmode_enabled = artifact == .exe and app_runtime == .glfw;