Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions scripts/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,20 @@ fn cmake_build() {
} else if cfg!(target_os = "macos") {
println!("cargo:rustc-link-lib=framework=CoreFoundation");
println!("cargo:rustc-link-lib=framework=Security");
} else if cfg!(windows) {
// Windows system libraries that the static msquic.lib depends on.
// These are excluded from the monolithic archive (via the inc/base_link
// EXCLUDE_LIST in CMake) and must be linked explicitly by the consumer.
for lib in [
"ws2_32", "ntdll", "bcrypt", "ncrypt", "crypt32", "iphlpapi", "advapi32",
"schannel",
] {
println!("cargo:rustc-link-lib={lib}");
}
if cfg!(feature = "openssl") || cfg!(feature = "quictls") {
// OpenSSL references user32 symbols (MessageBoxW, etc.)
println!("cargo:rustc-link-lib=user32");
}
}
}
}
Expand Down
Loading