apt-pkg-native/build.rs

20 lines
362 B
Rust
Raw Normal View History

2017-07-13 13:49:36 +01:00
extern crate gcc;
const SRC: &str = "apt-pkg-c/lib.cpp";
fn main() {
println!("cargo:rerun-if-changed={}", SRC);
2017-12-12 20:29:27 +00:00
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");
}