apt-pkg-native/build.rs
Chris West (Faux) 2f2167c027 new rustfmt
2018-04-12 20:35:08 +01:00

20 lines
364 B
Rust

extern crate gcc;
const SRC: &str = "apt-pkg-c/lib.cpp";
fn main() {
println!("cargo:rerun-if-changed={}", SRC);
let mut build = gcc::Build::new();
build.file(SRC);
build.cpp(true);
build.flag("-std=gnu++11");
#[cfg(feature = "ye-olde-apt")]
{
build.define("YE_OLDE_APT", "1");
}
build.compile("libapt-pkg-c.a");
}