Merge pull request #24 from gadomski/split-pkg-config-version-flags

Split the pkg-config version and flags checks
This commit is contained in:
Nathan Fiedler
2017-04-10 11:23:28 -07:00
committed by GitHub

View File

@ -29,11 +29,14 @@ static HEADER: &'static str = "#include <wand/MagickWand.h>\n";
fn main() { fn main() {
// Assert that the appropriate version of MagickWand is installed, // Assert that the appropriate version of MagickWand is installed,
// since we are very dependent on the particulars of MagickWand. // since we are very dependent on the particulars of MagickWand.
let library = pkg_config::Config::new() pkg_config::Config::new()
.atleast_version(MIN_VERSION) .atleast_version(MIN_VERSION)
.arg(format!("--max-version={}", MAX_VERSION)) .arg(format!("--max-version={}", MAX_VERSION))
.probe("MagickWand") .probe("MagickWand")
.unwrap(); .unwrap();
// We have to split the version check and the cflags/libs check because you can't do both at
// the same time on RHEL (apparently).
let library = pkg_config::Config::new().probe("MagickWand").unwrap();
// If the generated bindings are missing, generate them now. // If the generated bindings are missing, generate them now.
let out_dir = PathBuf::from(env::var("OUT_DIR").unwrap()); let out_dir = PathBuf::from(env::var("OUT_DIR").unwrap());