diff options
author | 2021-05-20 02:34:42 -0700 | |
---|---|---|
committer | 2021-05-20 02:34:42 -0700 | |
commit | 8b75f56577abc3ad2479b87fc59b7243add6a29a (patch) | |
tree | 5501729e5f81a6aa65ed986148956882e207d656 /build.zig | |
parent | 9541d268ded6ed38d739e62cb8b4cf597cf69193 (diff) | |
download | bun-8b75f56577abc3ad2479b87fc59b7243add6a29a.tar.gz bun-8b75f56577abc3ad2479b87fc59b7243add6a29a.tar.zst bun-8b75f56577abc3ad2479b87fc59b7243add6a29a.zip |
pico
Former-commit-id: cee857ac4e25638e5f93d838d54124ffaca938b7
Diffstat (limited to 'build.zig')
-rw-r--r-- | build.zig | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -1,5 +1,15 @@ const std = @import("std"); +pub fn addPicoHTTP(step: *std.build.LibExeObjStep, comptime dir: []const u8) void { + step.addCSourceFile(dir ++ "/picohttpparser/picohttpparser.c", &[_][]const u8{}); + step.addIncludeDir(dir ++ "/picohttpparser"); + + step.addPackage(.{ + .name = "picohttp", + .path = dir ++ "/picohttp.zig", + }); +} + pub fn build(b: *std.build.Builder) void { // Standard target options allows the person running `zig build` to choose // what target to build for. Here we do not override the defaults, which @@ -97,6 +107,7 @@ pub fn build(b: *std.build.Builder) void { if (!target.getCpuArch().isWasm()) { exe.addLibPath("/usr/local/lib"); + addPicoHTTP(exe, "src/deps"); } exe.install(); |