Remove Windows-specific invocation of MagickCore-config

This commit is contained in:
Yukun Guo
2024-09-18 11:16:29 +08:00
parent f796041b2f
commit 0b174a7e8a
2 changed files with 9 additions and 20 deletions

View File

@ -113,25 +113,14 @@ impl bindgen::callbacks::ParseCallbacks for RemoveEnumVariantSuffixes {
}
fn main() {
let check_cppflags = if cfg!(all(target_os = "windows", not(target_env = "msvc"))) {
// Resolve bash from directories listed in the PATH environment variable in the
// order they appear.
Command::new("cmd")
.arg("/C")
.arg("bash")
.arg("MagickCore-config")
.arg("--cppflags")
.output()
} else {
Command::new("MagickCore-config")
let check_cppflags = Command::new("MagickCore-config")
.arg("--cppflags")
.output()
.or_else(|_| {
Command::new("pkg-config")
.args(["--cflags", "MagickCore"])
.output()
})
};
});
if let Ok(ok_cppflags) = check_cppflags {
let cppflags = ok_cppflags.stdout;
let cppflags = String::from_utf8(cppflags).unwrap();

View File

@ -93,7 +93,7 @@ impl PixelWand {
set_get_unchecked!(
get_color_count, set_color_count, PixelGetColorCount, PixelSetColorCount, usize
get_index, set_index, PixelGetIndex, PixelSetIndex, f32
get_index, set_index, PixelGetIndex, PixelSetIndex, bindings::Quantum
get_fuzz, set_fuzz, PixelGetFuzz, PixelSetFuzz, f64
);