Skip to content

Commit fec2f96

Browse files
committed
download & install libzmq_dep
1 parent d23621a commit fec2f96

File tree

3 files changed

+18
-1
lines changed

3 files changed

+18
-1
lines changed

bindings/zig/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
zig-*

bindings/zig/build.zig

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ pub fn build(b: *std.Build) void {
1717
// set a preferred release mode, allowing the user to decide how to optimize.
1818
const optimize = b.standardOptimizeOption(.{});
1919

20+
const libzmq = b.dependency("libzmq", .{
21+
.optimize = optimize,
22+
.target = target,
23+
});
2024
const config_header = if (!target.isWindows()) b.addConfigHeader(.{
2125
.style = .blank,
2226
.include_path = "platform.h",
@@ -51,7 +55,8 @@ pub fn build(b: *std.Build) void {
5155
lib.linkSystemLibraryName("rpcrt4");
5256
lib.linkSystemLibraryName("iphlpapi");
5357
}
54-
lib.linkSystemLibrary("zmq");
58+
lib.linkLibrary(libzmq.artifact("zmq"));
59+
//lib.linkSystemLibrary("zmq");
5560
lib.linkLibC();
5661
// This declares intent for the library to be installed into the standard
5762
// location when the user invokes the "install" step (the default step when

bindings/zig/build.zig.zon

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
.{
2+
.name = "libzig_czmq",
3+
.version = "4.2.2",
4+
5+
.dependencies = .{
6+
.libzmq = .{
7+
.url = "https://github.com/kassane/libzmq/archive/89416003587ea21f36b8538791c4825fad012fba.tar.gz",
8+
.hash = "122026d048d3a2925e86b3121a98aa8546a6109ff8ecffa75e7d9f2d1aea614f7250",
9+
},
10+
},
11+
}

0 commit comments

Comments
 (0)