extern crate libbindgen; extern crate pkg_config; use std::env; use std::path::Path; fn main() { let out_dir = env::var("OUT_DIR").unwrap(); libbindgen::builder() .header("/usr/include/xcb/shm.h") .no_unstable_rust() .raw_line("use libc;") .ctypes_prefix("libc") .generate() .unwrap() .write_to_file(Path::new(&out_dir).join("shm.rs")) .unwrap(); pkg_config::probe_library("xcb").unwrap(); pkg_config::probe_library("xcb-shm").unwrap(); }