gamemode: use zig build

This commit is contained in:
Ali Chraghi 2022-09-18 21:31:01 +04:30 committed by Stephen Gutekanst
parent 15dfb2867a
commit 2ab3516795
6 changed files with 23 additions and 1650 deletions

14
libs/gamemode/build.zig Normal file
View file

@ -0,0 +1,14 @@
const std = @import("std");
pub const pkg = std.build.Pkg{
.name = "gamemode",
.source = .{ .path = thisDir() ++ "/gamemode.zig" },
};
pub fn link(step: *std.build.LibExeObjStep) void {
step.addIncludeDir(comptime thisDir() ++ "/upstream/include");
}
fn thisDir() []const u8 {
return std.fs.path.dirname(@src().file) orelse ".";
}

View file

@ -1,7 +1,7 @@
//! Note: All the above requests can be blocking - dbus requests can and will block while the daemon
//! handles the request. It is not recommended to make these calls in performance critical code
const builtin = @import("builtin");
pub const c = @import("gamemode_client.zig");
pub const c = @cImport(@cInclude("gamemode_client.h"));
pub const GamemodeError = error{
RequestFailed,

File diff suppressed because it is too large Load diff