Skip to content

Instantly share code, notes, and snippets.

@akavel
Created January 24, 2020 00:03
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 akavel/e5d15ca4935469e692a4f8e706c18b78 to your computer and use it in GitHub Desktop.
Save akavel/e5d15ca4935469e692a4f8e706c18b78 to your computer and use it in GitHub Desktop.
const Builder = @import("std").build.Builder;
const bb = @import("std").build;
const std = @import("std");
pub fn build(b: *Builder) void {
// b.linkSystemLibrary("c");
const lib = b.addSharedLibrary("popen", "popen.zig", b.version(0, 0, 1));
lib.addIncludeDir(".");
lib.linkLibC();
// lib.setTarget( .os = .windows, .arch = .x86_64, .abi = .gnu } });
lib.setTheTarget(bb.Target{ .Cross = bb.CrossTarget{ .os = .windows, .arch = .x86_64, .abi = .gnu } });
// lib.setTheTarget(.{ .Cross = .{ .os = .windows, .arch = .x86_64, .abi = .gnu } });
// b.addNativeSystemIncludeDir(".");
b.default_step.dependOn(&lib.step);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment