forked from doukutsu-rs/doukutsu-rs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.rs
26 lines (22 loc) · 892 Bytes
/
build.rs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
use std::env;
// #[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");
}
}