ntfylisten/build.zig

37 lines
934 B
Zig

const std = @import("std");
pub fn build(b: *std.Build) void {
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
const exe = b.addExecutable(.{
.name = "ntfylisten",
.root_source_file = .{ .path = "src/main.zig" },
.target = target,
.optimize = optimize,
});
exe.addModule("ws", b.dependency("ws", .{}).module("ws"));
// need libnotify, so might as well link glib and use glib logging
exe.linkLibC();
exe.linkSystemLibrary("glib-2.0");
// needed for libnotify
exe.linkSystemLibrary("gdk-pixbuf-2.0");
exe.linkSystemLibrary("notify");
b.installArtifact(exe);
const run_cmd = b.addRunArtifact(exe);
run_cmd.step.dependOn(b.getInstallStep());
if (b.args) |args| {
run_cmd.addArgs(args);
}
const run_step = b.step("run", "Run the app");
run_step.dependOn(&run_cmd.step);
}