fn main() { let meson_build_root = std::env::var("MESON_BUILD_ROOT").expect("build this through meson please!!"); glib_build_tools::compile_resources( &["resources", &format!("{meson_build_root}/resources")], "resources/audrey.gresource.xml", "audrey.gresource", ); // TODO: consider using meson to pass include paths println!("cargo:rustc-link-lib=mpv"); let bindings = bindgen::Builder::default() .header("src/mpv/wrapper.h") .parse_callbacks(Box::new(bindgen::CargoCallbacks::new())) .generate() .expect("could not generate bindings for mpv"); let out_path = std::path::PathBuf::from(std::env::var("OUT_DIR").unwrap()); bindings .write_to_file(out_path.join("mpv_ffi.rs")) .expect("could not write mpv bindings"); }