Skip to content

Instantly share code, notes, and snippets.

@Yardanico
Created September 6, 2019 22:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Yardanico/30fee7e7f73e779a6d5a21ad84996792 to your computer and use it in GitHub Desktop.
Save Yardanico/30fee7e7f73e779a6d5a21ad84996792 to your computer and use it in GitHub Desktop.
const Builder = @import("std").build.Builder;
pub fn build(b: *Builder) void {
const mode = b.standardReleaseOptions();
const lib = b.addSharedLibrary("liblibrouter", null, b.version(2, 6, 0));
lib.setBuildMode(mode);
const exe = b.addExecutable("zigrs", "src/main.zig");
exe.setBuildMode(mode);
exe.linkSystemLibrary("c");
exe.linkLibrary(lib);
const run_cmd = exe.run();
const run_step = b.step("run", "Run the app");
run_step.dependOn(&run_cmd.step);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment