include BCrypt on Windows

This commit is contained in:
Dustin J. Mitchell 2022-02-27 17:59:58 +00:00
parent 1c5b01975c
commit 85153423be
No known key found for this signature in database
2 changed files with 7 additions and 0 deletions

View file

@ -42,6 +42,8 @@ The necessary bits are:
Downstream consumers may use either the static or dynamic library, as they prefer.
NOTE: on Windows, the "BCrypt" library must be included when linking to taskchampion.
## Documentation Generation
The `mdbook` configuration contains a "preprocessor" implemented in the `taskchampion-cli` crate in order to reflect CLI usage information into the generated book.

View file

@ -19,6 +19,11 @@ fn link_libtaskchampion() {
let libtc_dir = libtc_dir.to_str().expect("path is valid utf-8");
println!("cargo:rustc-link-search={}", libtc_dir);
println!("cargo:rustc-link-lib=dylib=taskchampion");
// on windows, it appears that rust std requires BCrypt
if cfg!(target_os = "windows") {
println!("cargo:rustc-link-lib=dylib=bcrypt");
}
}
/// Build the Unity-based C test suite in `src/bindings_tests`, linking the result with this