// Taken from https://medium.com/dwelo-r-d/using-c-libraries-in-rust-13961948c72a fn main() { if cfg!(macos) { println!("cargo:rustc-env=MACOSX_DEPLOYMENT_TARGET=10.14"); } let src = [ "src/wren/src/vm/wren_compiler.c", "src/wren/src/vm/wren_core.c", "src/wren/src/vm/wren_debug.c", "src/wren/src/vm/wren_primitive.c", "src/wren/src/vm/wren_utils.c", "src/wren/src/vm/wren_value.c", "src/wren/src/vm/wren_vm.c", "src/wren/src/optional/wren_opt_meta.c", "src/wren/src/optional/wren_opt_random.c", ]; let mut builder = cc::Build::new(); let build = builder .files(src.iter()) .include("src/wren/src/include") .include("src/wren/src/vm") .include("src/wren/src/optional") .warnings(false); build.compile("wren"); }