core/gtk: unify libadwaita/adwaita options in the code

Fixes #2574
This commit is contained in:
Jeffrey C. Ollie
2024-11-08 22:16:44 -06:00
parent 75fe0b2dfb
commit b353ddf46d
6 changed files with 16 additions and 16 deletions

View File

@@ -12,7 +12,7 @@ const Config = @import("../../config.zig").Config;
/// This must be `inline` so that the comptime check noops conditional
/// paths that are not enabled.
pub inline fn enabled(config: *const Config) bool {
return build_options.libadwaita and
return build_options.adwaita and
config.@"gtk-adwaita";
}
@@ -30,7 +30,7 @@ pub fn versionAtLeast(
comptime minor: u16,
comptime micro: u16,
) bool {
if (comptime !build_options.libadwaita) return false;
if (comptime !build_options.adwaita) return false;
// If our header has lower versions than the given version,
// we can return false immediately. This prevents us from

View File

@@ -1,7 +1,7 @@
/// Imported C API directly from header files
pub const c = @cImport({
@cInclude("gtk/gtk.h");
if (@import("build_options").libadwaita) {
if (@import("build_options").adwaita) {
@cInclude("libadwaita-1/adwaita.h");
}