@@ -69,30 +69,26 @@ pub fn build(b: *std.Build) void {
69
69
ssh2_lib .root_module .addCSourceFiles (.{ .files = ssh2_src , .root = upstream .path ("" ), .flags = ssh2_flags });
70
70
71
71
if (mbedtls ) {
72
- ssh2_lib .root_module .addCSourceFile (.{ .file = upstream .path ("src/mbedtls.c" ), .flags = ssh2_flags });
73
72
ssh2_lib .root_module .addCMacro ("LIBSSH2_MBEDTLS" , "1" );
74
73
ssh2_lib .linkSystemLibrary ("mbedtls" );
75
74
ssh2_lib .linkSystemLibrary ("mbedcrypto" );
76
75
ssh2_lib .linkSystemLibrary ("mbedx509" );
77
76
}
78
77
79
78
if (openssl ) {
80
- ssh2_lib .root_module .addCSourceFile (.{ .file = upstream .path ("src/openssl.c" ), .flags = ssh2_flags });
81
79
ssh2_lib .root_module .addCMacro ("LIBSSH2_OPENSSL" , "1" );
82
80
ssh2_lib .linkSystemLibrary ("ssl" );
83
81
ssh2_lib .linkSystemLibrary ("crypto" );
84
82
}
85
83
86
84
if (wincng ) {
87
- ssh2_lib .root_module .addCSourceFile (.{ .file = upstream .path ("src/wincng.c" ), .flags = ssh2_flags });
88
85
ssh2_lib .root_module .addCMacro ("LIBSSH2_WINCNG" , "1" );
89
86
// Windows system libs (zig handles names)
90
87
ssh2_lib .linkSystemLibrary ("bcrypt" );
91
88
ssh2_lib .linkSystemLibrary ("ncrypt" );
92
89
}
93
90
94
91
if (libgcrypt ) {
95
- ssh2_lib .root_module .addCSourceFile (.{ .file = upstream .path ("src/libgcrypt.c" ), .flags = ssh2_flags });
96
92
ssh2_lib .root_module .addCMacro ("LIBSSH2_LIBGCRYPT" , "1" );
97
93
ssh2_lib .linkSystemLibrary ("gcrypt" );
98
94
}
@@ -136,6 +132,7 @@ pub const ssh2_src: []const []const u8 = &.{
136
132
"src/userauth.c" ,
137
133
"src/userauth_kbd_packet.c" ,
138
134
"src/version.c" ,
135
+ "src/crypto.c" ,
139
136
};
140
137
141
138
pub const ssh2_flags : []const []const u8 = &.{};
0 commit comments