diff options
Diffstat (limited to 'comments/build.zig')
-rw-r--r-- | comments/build.zig | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/comments/build.zig b/comments/build.zig index eb8f8fb..3293e4c 100644 --- a/comments/build.zig +++ b/comments/build.zig @@ -27,20 +27,20 @@ pub fn build(b: *std.Build) void { }); const zws = b.dependency("zigwebserver", opts); - exe.addModule("zws", zws.module("zigwebserver")); - exe.linkLibrary(zws.artifact("zigwebserver")); + exe.root_module.addImport("zws", zws.module("zigwebserver")); const pq = b.dependency("pq", opts); - exe.addModule("pq", pq.module("pq")); - exe.linkLibrary(pq.artifact("pq")); + exe.root_module.addImport("pq", pq.module("pq")); + exe.linkLibC(); + exe.linkSystemLibrary("pq"); const mustache = b.dependency("mustache", opts); - exe.addModule("mustache", mustache.module("mustache")); - exe.linkLibrary(mustache.artifact("mustache-static")); + exe.root_module.addImport("mustache", mustache.module("mustache")); const smtp = b.dependency("smtp", opts); - exe.addModule("smtp", smtp.module("smtp")); - exe.linkLibrary(smtp.artifact("smtp")); + exe.root_module.addImport("smtp", smtp.module("smtp")); + + // This declares intent for the executable to be installed into the // standard location when the user invokes the "install" step (the default @@ -77,7 +77,7 @@ pub fn build(b: *std.Build) void { .target = target, .optimize = optimize, }); - unit_tests.addModule("mustache", mustache.module("mustache")); + unit_tests.root_module.addImport("mustache", mustache.module("mustache")); const run_unit_tests = b.addRunArtifact(unit_tests); |