oslib/server/build.zig

27 lines
737 B
Zig
Raw Normal View History

2024-06-24 12:54:49 -06:00
const std = @import("std");
pub fn build(b: *std.Build) !void {
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
2024-06-26 12:12:29 -06:00
const libvirt = b.dependency("libvirt", .{});
2024-06-24 12:54:49 -06:00
const exe = b.addExecutable(.{
.name = "server",
.root_source_file = b.path("src/main.zig"),
.target = target,
.optimize = optimize,
});
2024-06-26 12:12:29 -06:00
exe.root_module.addImport("libvirt", libvirt.module("libvirt"));
2024-06-24 12:54:49 -06:00
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);
}