apt-pkg-native/build.rs
2018-04-14 20:43:04 +01:00

20 lines
362 B
Rust

extern crate cc;
const SRC: &str = "apt-pkg-c/lib.cpp";
fn main() {
println!("cargo:rerun-if-changed={}", SRC);
let mut build = cc::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");
}