Skip to content

Commit

Permalink
Format ports/libsimpleservo
Browse files Browse the repository at this point in the history
  • Loading branch information
chansuke committed Sep 11, 2018
1 parent b0ee750 commit 0f90d98
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions ports/libsimpleservo/build.rs
Expand Up @@ -20,7 +20,8 @@ fn main() {

fn android_main() {
// Get the NDK path from NDK_HOME env.
let ndk_path = env::var_os("ANDROID_NDK").expect("Please set the ANDROID_NDK environment variable");
let ndk_path =
env::var_os("ANDROID_NDK").expect("Please set the ANDROID_NDK environment variable");
let ndk_path = Path::new(&ndk_path);

let target = env::var("TARGET").unwrap();
Expand All @@ -43,7 +44,11 @@ fn android_main() {
};

// compiling android_native_app_glue.c
let c_file = ndk_path.join("sources").join("android").join("native_app_glue").join("android_native_app_glue.c");
let c_file = ndk_path
.join("sources")
.join("android")
.join("native_app_glue")
.join("android_native_app_glue.c");
let sysroot = ndk_path.join("platforms").join(platform).join(arch);
cc::Build::new()
.file(c_file)
Expand All @@ -53,13 +58,13 @@ fn android_main() {
.compile("android_native_app_glue");

// Get the output directory.
let out_dir = env::var("OUT_DIR").expect("Cargo should have set the OUT_DIR environment variable");
let out_dir =
env::var("OUT_DIR").expect("Cargo should have set the OUT_DIR environment variable");

println!("cargo:rustc-link-lib=static=android_native_app_glue");
println!("cargo:rustc-link-search=native={}", out_dir);
println!("cargo:rustc-link-lib=log");
println!("cargo:rustc-link-lib=android");

}

fn generate_gl_bindings(target: &str) {
Expand Down

0 comments on commit 0f90d98

Please sign in to comment.