1
0
Fork 0
mirror of https://github.com/doukutsu-rs/doukutsu-rs synced 2024-11-26 07:22:45 +00:00
doukutsu-rs/build.rs
2021-02-24 09:28:47 +01:00

29 lines
929 B
Rust

use std::env;
use std::fs::File;
use std::path::PathBuf;
// #[cfg(feature = "generate-gl")]
// use gl_generator::{Api, Fallbacks, Profile, Registry};
fn main() {
// let dest = PathBuf::from(&env::var("OUT_DIR").unwrap());
let target = env::var("TARGET").unwrap_or_else(|e| panic!(e));
let is_android = cfg!(target_os = "android") || (cfg!(target_os = "linux") && target.contains("android")); // hack
println!("cargo:rerun-if-changed=build.rs");
//
// #[cfg(feature = "generate-gl")]
// {
// let mut file = File::create(&dest.join("gl_bindings.rs")).unwrap();
//
// Registry::new(Api::Gles2, (3, 0), Profile::Core, Fallbacks::All, [])
// .write_bindings(gl_generator::StructGenerator, &mut file)
// .unwrap();
// }
if is_android {
println!("cargo:rustc-link-lib=dylib=GLESv2");
println!("cargo:rustc-link-lib=dylib=EGL");
}
}