| # 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") |
| |
| gvr_arch = current_cpu |
| if (gvr_arch == "x64") { |
| gvr_arch = "x86_64" |
| } |
| |
| android_aar_prebuilt("gvr_common_java") { |
| aar_path = "src/ndk/lib/common_library.aar" |
| } |
| |
| android_aar_prebuilt("gvr_base_java") { |
| aar_path = "src/libraries/base/base.aar" |
| proguard_configs = [ "src/proguard-gvr.txt" ] |
| ignore_manifest = true # Ignored because manifest merging is not supported (http://crbug.com/643967) |
| ignore_native_libraries = true |
| } |
| |
| android_aar_prebuilt("gvr_controller_java") { |
| aar_path = "src/libraries/controller/controller.aar" |
| } |
| |
| source_set("libgvr") { |
| if (gvr_arch != "mipsel") { |
| data_deps = [ |
| ":libgvr_copy", |
| ] |
| libs = [ "${root_out_dir}/libgvr.so" ] |
| } |
| } |
| |
| if (gvr_arch != "mipsel") { |
| copy("libgvr_copy") { |
| sources = [ |
| "src/ndk/lib/android_${gvr_arch}/libgvr.so", |
| ] |
| outputs = [ |
| "${root_out_dir}/libgvr.so", |
| ] |
| } |
| } |
| |
| config("libgvr_config") { |
| include_dirs = [ "src/ndk/include/" ] |
| } |