| # Copyright 2016 The Chromium Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| import("//build/config/android/rules.gni") |
| |
| android_aar_prebuilt("gvr_common_java") { |
| aar_path = "src/ndk-beta/lib/common_library.aar" |
| jar_excluded_patterns = [ "*/protobuf/*" ] |
| } |
| |
| android_aar_prebuilt("gvr_base_java") { |
| aar_path = "src/libraries/base/base.aar" |
| } |
| |
| android_aar_prebuilt("gvr_controller_java") { |
| aar_path = "src/libraries/controller/controller.aar" |
| } |
| |
| source_set("libgvr") { |
| deps = [ |
| ":libgvr_shared_library", |
| ] |
| libs = [ "$root_out_dir/libgvr.so" ] |
| } |
| |
| copy("libgvr_shared_library") { |
| if (current_cpu == "arm") { |
| sources = [ |
| "src/ndk-beta/lib/android_arm/libgvr.so", |
| ] |
| } else if (current_cpu == "arm64") { |
| sources = [ |
| "src/ndk-beta/lib/android_arm64/libgvr.so", |
| ] |
| } else if (current_cpu == "x86") { |
| sources = [ |
| "src/ndk-beta/lib/android_x86/libgvr.so", |
| ] |
| } else if (current_cpu == "x64") { |
| sources = [ |
| "src/ndk-beta/lib/android_x86_64/libgvr.so", |
| ] |
| } |
| outputs = [ |
| "${root_out_dir}/libgvr.so", |
| ] |
| } |
| |
| config("libgvr_config") { |
| include_dirs = [ "src/ndk-beta/include/" ] |
| } |