Stephen Seo
41d2f786fc
Update dependencies: rand -> 0.8.5 bindgen -> 0.69 (Also used `cargo update`.) Update LICENSE year. Fix build.rs based on change in bindgen. Update to Raylib 5.0. Fixes in src/original_impl.rs due to changes in rand dependency. (RNG.gen_range(...) requires 1 range argument instead of two args.) Minor tweaks to wasm/Makefile.
22 lines
666 B
Rust
22 lines
666 B
Rust
extern crate bindgen;
|
|
|
|
use std::env;
|
|
use std::path::PathBuf;
|
|
|
|
fn main() {
|
|
println!("cargo:rustc-link-lib=raylib");
|
|
println!("cargo:rustc-link-lib=OpenGL");
|
|
println!("cargo:rerun-if-changed=raylib/raylib.h");
|
|
|
|
let bindings = bindgen::Builder::default()
|
|
.header("raylib/raylib.h")
|
|
.parse_callbacks(Box::new(bindgen::CargoCallbacks::new()))
|
|
.clang_arg("-fvisibility=default")
|
|
.generate()
|
|
.expect("Unable to generate bindings");
|
|
|
|
let out_path = PathBuf::from(env::var("OUT_DIR").unwrap());
|
|
bindings
|
|
.write_to_file(out_path.join("raylib_bindings.rs"))
|
|
.expect("Couldn't write bindings!");
|
|
}
|