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

readd -Dopenssl to zap build. modify readme for instructions how to use it

This commit is contained in:
Vemahk 2024-01-05 20:04:38 -06:00 committed by Rene Schallner
parent 31bf768b96
commit 613afaf1af
2 changed files with 2 additions and 1 deletions

View file

@ -275,6 +275,7 @@ Then, in your `build.zig`'s `build` function, add the following before
const zap = b.dependency("zap", .{
.target = target,
.optimize = optimize,
//.openssl = true, // required to use tls
});
exe.addModule("zap", zap.module("zap"));
exe.linkLibrary(zap.artifact("facil.io"));

View file

@ -8,7 +8,7 @@ pub fn build(b: *std.Build) !void {
const optimize = b.standardOptimizeOption(.{});
// Use an os env var to determine whether to build openssl support
const use_openssl = blk: {
const use_openssl = b.option(bool, "openssl", "Use system-installed openssl for TLS support in zap") orelse blk: {
if (std.os.getenv("ZAP_USE_OPENSSL")) |val| {
if (std.mem.eql(u8, val, "true")) break :blk true;
}