Skip to content

Commit 99a4089

Browse files
stefikskuh
authored andcommitted
[fix] make it a proper static lib module, instead of a "useless" binary module
1 parent 681702d commit 99a4089

File tree

1 file changed

+4
-13
lines changed

1 file changed

+4
-13
lines changed

build.zig

+4-13
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,14 @@ pub fn build(b: *std.Build) void {
1414
module.addIncludePath(b.path("BearSSL/inc"));
1515
module.addIncludePath(b.path("BearSSL/tools"));
1616

17-
const exe = b.addExecutable(.{
17+
const lib = b.addStaticLibrary(.{
1818
.name = "zig-bearssl",
19-
.root_source_file = b.path("src/main.zig"),
19+
.root_source_file = b.path("src/lib.zig"),
2020
.target = target,
2121
.optimize = optimize,
2222
});
2323

24-
bearssl.linkBearSSL(".", exe, target, b);
25-
26-
b.installArtifact(exe);
27-
28-
const run_cmd = b.addRunArtifact(exe);
29-
run_cmd.step.dependOn(b.getInstallStep());
30-
if (b.args) |args| {
31-
run_cmd.addArgs(args);
32-
}
24+
bearssl.linkBearSSL(".", lib, target, b);
3325

34-
const run_step = b.step("run", "Run the app");
35-
run_step.dependOn(&run_cmd.step);
26+
b.installArtifact(lib);
3627
}

0 commit comments

Comments
 (0)