mirror of
https://github.com/zigzap/zap.git
synced 2025-10-20 15:14:08 +00:00
openssl support depend on ZAP_USE_OPENSSL=true env
This commit is contained in:
parent
081bd05a5b
commit
6e5d028d51
1 changed files with 7 additions and 1 deletions
|
@ -7,7 +7,13 @@ pub fn build(b: *std.build.Builder) !void {
|
||||||
// between Debug, ReleaseSafe, ReleaseFast, and ReleaseSmall.
|
// between Debug, ReleaseSafe, ReleaseFast, and ReleaseSmall.
|
||||||
const optimize = b.standardOptimizeOption(.{});
|
const optimize = b.standardOptimizeOption(.{});
|
||||||
|
|
||||||
const use_openssl = b.option(bool, "openssl", "Use system-installed openssl for TLS support in zap") orelse false;
|
// Use an os env var to determine whether to build openssl support
|
||||||
|
const use_openssl = blk: {
|
||||||
|
if (std.os.getenv("ZAP_USE_OPENSSL")) |val| {
|
||||||
|
if (std.mem.eql(u8, val, "true")) break :blk true;
|
||||||
|
}
|
||||||
|
break :blk false;
|
||||||
|
};
|
||||||
|
|
||||||
// create a module to be used internally.
|
// create a module to be used internally.
|
||||||
var zap_module = b.createModule(.{
|
var zap_module = b.createModule(.{
|
||||||
|
|
Loading…
Add table
Reference in a new issue