use system_deps; fn main() { let sources = vec!["mgr", "module", "versekey", "versification"]; let deps = system_deps::Config::new().probe().unwrap(); let mut build = cxx_build::bridge("src/cxx/mod.rs"); for src in sources { build.file(&format!("src/cxx/{}.cc", src)); println!("cargo:rerun-if-changed=src/cxx/{}.cc", src); println!("cargo:rerun-if-changed=src/cxx/{}.h", src); } build .includes(deps.all_include_paths()) .cpp_link_stdlib("stdc++") .flag("-Os") .compile("sword_rs"); println!("cargo:rerun-if-changed=src/cxx/mod.rs"); println!("cargo:rustc-link-lib=sword"); }