1
0
Fork 0
mirror of https://github.com/zigzap/zap.git synced 2025-10-20 15:14:08 +00:00

Merge pull request #103 from LordAsdi/master

Fix build.zig to allow cross compilation on windows
This commit is contained in:
Rene Schallner 2024-05-26 12:56:58 +02:00 committed by GitHub
commit 094d4cf6f9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -13,9 +13,10 @@ pub fn build(b: *std.Build) !void {
const use_openssl = b.option(bool, "openssl", "Use system-installed openssl for TLS support in zap") orelse blk: {
// Alternatively, use an os env var to determine whether to build openssl support
if (std.posix.getenv("ZAP_USE_OPENSSL")) |val| {
if (std.process.getEnvVarOwned(b.allocator, "ZAP_USE_OPENSSL")) |val| {
defer b.allocator.free(val);
if (std.mem.eql(u8, val, "true")) break :blk true;
}
} else |_| {}
break :blk false;
};