Skip to content

Commit

Permalink
Allow specifying MSYS2 directory.
Browse files Browse the repository at this point in the history
  • Loading branch information
DDoSolitary committed Jan 21, 2020
1 parent 86b67f2 commit 6912956
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@ fn main() {
));

let libssh_dir = env::var("YASFW_LIBSSH_DIR").unwrap_or(format!(
"C:\\msys64\\mingw{}\\lib",
"{}\\mingw{}\\lib",
env::var("YASFW_MSYS2_DIR").unwrap_or("C:\\msys64".to_owned()),
if env::var("TARGET").unwrap().starts_with("x86_64") { "64" } else { "32" },
));

println!("cargo:rerun-if-env-changed=YASFW_DOKAN_DIR");
println!("cargo:rerun-if-env-changed=YASFW_MSYS2_DIR");
println!("cargo:rerun-if-env-changed=YASFW_LIBSSH_DIR");
println!("cargo:rustc-link-search=native={}", dokan_dir);
println!("cargo:rustc-link-search=native={}", libssh_dir);
Expand Down

0 comments on commit 6912956

Please sign in to comment.