Skip to content

Instantly share code, notes, and snippets.

@marijnfs
Created October 19, 2019 08:56
Show Gist options
  • Save marijnfs/491250ada91e390a8b91e25305045aa5 to your computer and use it in GitHub Desktop.
Save marijnfs/491250ada91e390a8b91e25305045aa5 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 exe = b.addExecutable("pub", "src/pub.zig");
exe.setBuildMode(mode);
exe.addLibPath("/usr/lib64");
exe.linkSystemLibrary("zmq");
exe.install();
// const exe2 = b.addExecutable("sub", "src/sub.zig");
// exe2.setBuildMode(mode);
// exe2.addLibPath("/usr/lib64");
// exe2.linkSystemLibrary("zmq");
// exe2.install();
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);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment