glitch art scripting language
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

build.zig 1.0KB

12345678910111213141516171819202122232425262728293031323334353637
  1. const builds = @import("std").build;
  2. const Builder = @import("std").build.Builder;
  3. fn setupLinks(step: *builds.LibExeObjStep) void {
  4. step.linkSystemLibrary("lilv-0");
  5. step.linkSystemLibrary("sndfile");
  6. // TODO 2.30 glibc
  7. step.linkSystemLibrary("c");
  8. step.linkSystemLibrary("GraphicsMagickWand");
  9. step.linkSystemLibrary("GraphicsMagick");
  10. step.addIncludeDir("/usr/include/lilv-0");
  11. step.addIncludeDir("/usr/include/GraphicsMagick");
  12. }
  13. pub fn build(b: *Builder) void {
  14. const mode = b.standardReleaseOptions();
  15. const exe = b.addExecutable("scritcher", "src/main.zig");
  16. exe.setBuildMode(mode);
  17. exe.install();
  18. setupLinks(exe);
  19. const test_obj_step = b.addTest("src/main.zig");
  20. setupLinks(test_obj_step);
  21. const run_cmd = exe.run();
  22. run_cmd.step.dependOn(b.getInstallStep());
  23. const run_step = b.step("run", "Run the app");
  24. run_step.dependOn(&run_cmd.step);
  25. const test_step = b.step("test", "Run tests");
  26. test_step.dependOn(&test_obj_step.step);
  27. }