Skip to content

Commit

Permalink
add missing source file
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobly0 committed Oct 12, 2024
1 parent e4da72f commit 40a2c11
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,18 @@ pub fn build(b: *Build) void {
.optimize = optimize,
.link_libc = true,
});
mbedtls.addIncludePath(mbedtls_dep.path("include"));
inline for (srcs) |src|
mbedtls.addCSourceFile(.{
.file = mbedtls_dep.path(b.fmt("library/{s}", .{src})),
.flags = &.{},
});
mbedtls.root_module.addIncludePath(mbedtls_dep.path("include"));
mbedtls.root_module.addCSourceFiles(.{
.root = mbedtls_dep.path("library"),
.files = srcs,
});

mbedtls.installHeadersDirectory(mbedtls_dep.path("include/mbedtls"), "mbedtls", .{});
mbedtls.installHeadersDirectory(mbedtls_dep.path("include/psa"), "psa", .{});
b.installArtifact(mbedtls);

if (target.result.os.tag == .windows) {
mbedtls.linkSystemLibrary("bcrypt");
mbedtls.root_module.linkSystemLibrary("bcrypt", .{});
}

const selftest = b.addExecutable(.{
Expand Down Expand Up @@ -154,4 +153,5 @@ const srcs: []const []const u8 = &.{
"cipher.c",
"ecdsa.c",
"nist_kw.c",
"pk_ecc.c",
};

0 comments on commit 40a2c11

Please sign in to comment.