scritcher/build.zig
2019-08-27 14:40:41 -03:00

37 lines
1 KiB
Zig

const builds = @import("std").build;
const Builder = @import("std").build.Builder;
fn setupLinks(step: *builds.LibExeObjStep) void {
step.linkSystemLibrary("lilv-0");
step.linkSystemLibrary("sndfile");
// TODO 2.30 glibc
step.linkSystemLibrary("c");
step.linkSystemLibrary("GraphicsMagickWand");
step.linkSystemLibrary("GraphicsMagick");
step.addIncludeDir("/usr/include/lilv-0");
step.addIncludeDir("/usr/include/GraphicsMagick");
}
pub fn build(b: *Builder) void {
const mode = b.standardReleaseOptions();
const exe = b.addExecutable("scritcher", "src/main.zig");
exe.setBuildMode(mode);
exe.install();
setupLinks(exe);
const test_obj_step = b.addTest("src/main.zig");
setupLinks(test_obj_step);
const run_cmd = exe.run();
run_cmd.step.dependOn(b.getInstallStep());
const run_step = b.step("run", "Run the app");
run_step.dependOn(&run_cmd.step);
const test_step = b.step("test", "Run tests");
test_step.dependOn(&test_obj_step.step);
}