Guest User

Untitled

a guest
Nov 14th, 2019
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. const Builder = @import("std").build.Builder;
  2.  
  3. pub fn build(b: *Builder) void {
  4. const mode = b.standardReleaseOptions();
  5. const exe = b.addExecutable("demo", "src/main.zig");
  6. exe.setBuildMode(mode);
  7. exe.linkSystemLibrary("c");
  8. exe.linkSystemLibrary("/usr/local/Cellar/sdl2/2.0.10/lib/libSDL2.a");
  9. exe.addIncludeDir("/usr/local/Cellar/sdl2/2.0.10/include/");
  10. exe.install();
  11.  
  12. const run_cmd = exe.run();
  13. run_cmd.step.dependOn(b.getInstallStep());
  14.  
  15. const run_step = b.step("run", "Run the app");
  16. run_step.dependOn(&run_cmd.step);
  17. }
Add Comment
Please, Sign In to add comment