Fix zouter module configuration.
This commit is contained in:
parent
dfc3a01645
commit
23b6afea35
1 changed files with 12 additions and 4 deletions
16
build.zig
16
build.zig
|
@ -26,14 +26,22 @@ pub fn build(b: *std.Build) void {
|
||||||
.optimize = optimize,
|
.optimize = optimize,
|
||||||
});
|
});
|
||||||
|
|
||||||
// Add zap dependency.
|
|
||||||
lib.root_module.addImport("zap", zap.module("zap"));
|
|
||||||
|
|
||||||
// This declares intent for the library to be installed into the standard
|
// This declares intent for the library to be installed into the standard
|
||||||
// location when the user invokes the "install" step (the default step when
|
// location when the user invokes the "install" step (the default step when
|
||||||
// running `zig build`).
|
// running `zig build`).
|
||||||
b.installArtifact(lib);
|
b.installArtifact(lib);
|
||||||
|
|
||||||
|
// Add zouter module.
|
||||||
|
const zouter_module = b.addModule("zouter", .{
|
||||||
|
.root_source_file = b.path("src/root.zig"),
|
||||||
|
.target = target,
|
||||||
|
.optimize = optimize,
|
||||||
|
});
|
||||||
|
|
||||||
|
// Add zap dependency.
|
||||||
|
lib.root_module.addImport("zap", zap.module("zap"));
|
||||||
|
zouter_module.addImport("zap", zap.module("zap"));
|
||||||
|
|
||||||
// Creates a step for unit testing. This only builds the test executable
|
// Creates a step for unit testing. This only builds the test executable
|
||||||
// but does not run it.
|
// but does not run it.
|
||||||
const lib_unit_tests = b.addTest(.{
|
const lib_unit_tests = b.addTest(.{
|
||||||
|
@ -45,7 +53,7 @@ pub fn build(b: *std.Build) void {
|
||||||
// Add zap dependency.
|
// Add zap dependency.
|
||||||
lib_unit_tests.root_module.addImport("zap", zap.module("zap"));
|
lib_unit_tests.root_module.addImport("zap", zap.module("zap"));
|
||||||
// Add zouter dependency.
|
// Add zouter dependency.
|
||||||
lib_unit_tests.root_module.addImport("zouter", &lib.root_module);
|
lib_unit_tests.root_module.addImport("zouter", zouter_module);
|
||||||
|
|
||||||
const run_lib_unit_tests = b.addRunArtifact(lib_unit_tests);
|
const run_lib_unit_tests = b.addRunArtifact(lib_unit_tests);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue