With 16667 merged, we can make any c package with zig build without vendoring it, but it looks like that the target option will not be inherited by dependencies that do not use module but only artifacts. here is My temporary hack, is there any other way that I am not aware of?
const wepoll_dep = b.dependency("wepoll", .{});
if (t.os.tag == .windows) {
var wepoll_lib = wepoll_dep.artifact("wepoll");
wepoll_lib.target = target;
wepoll_lib.optimize = optimize;
lib.linkLibrary(wepoll_lib);
}
link to the repo: libev/build.zig at main - libev - Codeberg.org