Skip to content

Commit

Permalink
use the LIBXML2 variable if set directly instead of figuring out pack…
Browse files Browse the repository at this point in the history
…aging
  • Loading branch information
przygienda authored and dginev committed May 17, 2021
1 parent b85992f commit a14ed4b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ fn main() {
let p = std::path::Path::new(s);
let fname = std::path::Path::new(p.file_name().expect("no file name in LIBXML2 env"));
assert!(p.is_file());
println!("cargo:rustc-link-lib={}", fname.file_stem().unwrap().to_string_lossy());
println!("cargo:rustc-link-lib={}", fname.file_stem().unwrap().to_string_lossy().strip_prefix("lib").unwrap());
println!("cargo:rustc-link-search={}", p.parent().expect("no library path in LIBXML2 env").to_string_lossy());
} else {
#[cfg(any(target_family = "unix", target_os = "macos"))]
Expand Down

0 comments on commit a14ed4b

Please sign in to comment.