Closed ritalin closed 3 months ago
I'll provide this PR again by officially release of zig lang 0.13.0.
Hi, thanks for the PR. I created a new branch zig-0.13-wip
for adapting to Zig 0.13.
Regarding the prefix build option, I am assuming, this is required for your project?
Yes, the prefix
option needs for my project.
Reason:
I've installed the libzmq by homebrew on MacOS.
The homebrew is installed into /usr/local/opt
For avoiding conflict, I do not add this path to system environment variable.
So I'd like to pass this prefix as dependency option.
FYI, I just updated zzmq to Zig 0.13.
Please feel free to provide a PR for the prefix
option. However I think zmq-prefix
would be better, since the prefix generally would be expected to apply to all libraries (including libc), instead of zmq, only.
What are your thoughts here?
LGTM
But a user may be re-define the prefix
to other option in hosted project if this option is duplicated or polluted the project.
// build.zig in host project
const zig_option = b.option([]const u8, "zig-option", "description");
const dep = b.dependency("zzmq", .{ .prefix = zig_option });
In zig 0.13.0, build configration is changed. e.g. the
path
field ofstd.Build.LazyPath
is deprecated, and so on...This PR has dealt with following problem:
path
field ofstd.Build.LazyPath to
std.Build.path` method.Additionally, a installed path of libzmq (prefix) as the project specific option.
If libzmq is installed on system, it can pass prefix.