OLD | NEW |
1 # Copyright 2016 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import("//build/config/android/rules.gni") | 5 import("//build/config/android/rules.gni") |
6 | 6 |
7 gvr_arch = current_cpu | 7 gvr_arch = current_cpu |
8 if (gvr_arch == "x64") { | 8 if (gvr_arch == "x64") { |
9 gvr_arch = "x86_64" | 9 gvr_arch = "x86_64" |
10 } | 10 } |
11 | 11 |
12 android_aar_prebuilt("gvr_common_java") { | 12 android_aar_prebuilt("gvr_common_java") { |
13 aar_path = "src/ndk-beta/lib/common_library.aar" | 13 aar_path = "src/ndk-beta/lib/common_library.aar" |
14 jar_excluded_patterns = [ "*/protobuf/*" ] | 14 jar_excluded_patterns = [ "*/protobuf/*" ] |
15 } | 15 } |
16 | 16 |
17 android_aar_prebuilt("gvr_base_java") { | 17 android_aar_prebuilt("gvr_base_java") { |
18 aar_path = "src/libraries/base/base.aar" | 18 aar_path = "src/libraries/base/base.aar" |
19 } | 19 } |
20 | 20 |
21 android_aar_prebuilt("gvr_controller_java") { | 21 android_aar_prebuilt("gvr_controller_java") { |
22 aar_path = "src/libraries/controller/controller.aar" | 22 aar_path = "src/libraries/controller/controller.aar" |
23 } | 23 } |
24 | 24 |
25 source_set("libgvr") { | 25 source_set("libgvr") { |
26 data_deps = [ | 26 if (gvr_arch != "mipsel") { |
27 ":libgvr_copy", | 27 data_deps = [ |
28 ] | 28 ":libgvr_copy", |
29 libs = [ "${root_out_dir}/libgvr.so" ] | 29 ] |
| 30 libs = [ "${root_out_dir}/libgvr.so" ] |
| 31 } |
30 } | 32 } |
31 | 33 |
32 copy("libgvr_copy") { | 34 if (gvr_arch != "mipsel") { |
33 sources = [ | 35 copy("libgvr_copy") { |
34 "src/ndk-beta/lib/android_${gvr_arch}/libgvr.so", | 36 sources = [ |
35 ] | 37 "src/ndk-beta/lib/android_${gvr_arch}/libgvr.so", |
36 outputs = [ | 38 ] |
37 "${root_out_dir}/libgvr.so", | 39 outputs = [ |
38 ] | 40 "${root_out_dir}/libgvr.so", |
| 41 ] |
| 42 } |
39 } | 43 } |
40 | 44 |
41 config("libgvr_config") { | 45 config("libgvr_config") { |
42 include_dirs = [ "src/ndk-beta/include/" ] | 46 include_dirs = [ "src/ndk-beta/include/" ] |
43 } | 47 } |
OLD | NEW |