-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.rs
26 lines (25 loc) · 1.16 KB
/
build.rs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
fn main() -> miette::Result<()> {
let path = std::path::PathBuf::from("src"); // include path
let mut b = autocxx_build::Builder::new("src/ffi.rs", &[&path])
.extra_clang_args(&["-std=c++17"])
.build()?;
b.flag_if_supported("-std=c++17").compile("libname"); // arbitrary library name
println!("cargo:rerun-if-changed=src/ffi.rs");
println!("cargo:rerun-if-changed=src/wrapper.h");
// This list is from CMakeLists.txt generated by a cpp-flowgraph of grc
println!("cargo:rustc-link-lib=gnuradio-blocks");
println!("cargo:rustc-link-lib=gnuradio-runtime");
println!("cargo:rustc-link-lib=gnuradio-pmt");
println!("cargo:rustc-link-lib=boost_program_options");
println!("cargo:rustc-link-lib=boost_system");
println!("cargo:rustc-link-lib=boost_regex");
println!("cargo:rustc-link-lib=boost_thread");
println!("cargo:rustc-link-lib=boost_atomic");
println!("cargo:rustc-link-lib=spdlog");
println!("cargo:rustc-link-lib=fmt");
println!("cargo:rustc-link-lib=gmpxx");
println!("cargo:rustc-link-lib=gmp");
println!("cargo:rustc-link-lib=volk");
println!("cargo:rustc-link-lib=sndfile");
Ok(())
}