Directly link to MSYS2's .dll.a files

This commit is contained in:
Yukun Guo
2023-11-29 12:14:15 +08:00
parent 168abe5547
commit a72253ed25
2 changed files with 8 additions and 14 deletions

View File

@ -260,6 +260,11 @@ fn determine_mode<T: AsRef<str>>(libdirs: &Vec<PathBuf>, libs: &[T]) -> &'static
(true, false) => return "static",
(false, true) => return "dylib",
(false, false) => {
let can_static_verbatim = libs.iter().all(|l| files.contains(l.as_ref()));
if can_static_verbatim {
return "static:+verbatim";
}
panic!(
"ImageMagick libdirs at `{:?}` do not contain the required files \
to either statically or dynamically link ImageMagick",