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:
parent
7ca46c4f10
commit
235e9045fc
2 changed files with 2 additions and 1 deletions
|
@ -273,6 +273,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"));
|
||||
|
|
|
@ -8,7 +8,7 @@ pub fn build(b: *std.build.Builder) !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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue