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 |
| 8 if (gvr_arch == "x64") { |
| 9 gvr_arch = "x86_64" |
| 10 } |
| 11 |
7 android_aar_prebuilt("gvr_common_java") { | 12 android_aar_prebuilt("gvr_common_java") { |
8 aar_path = "src/ndk-beta/lib/common_library.aar" | 13 aar_path = "src/ndk-beta/lib/common_library.aar" |
9 jar_excluded_patterns = [ "*/protobuf/*" ] | 14 jar_excluded_patterns = [ "*/protobuf/*" ] |
10 } | 15 } |
11 | 16 |
12 android_aar_prebuilt("gvr_base_java") { | 17 android_aar_prebuilt("gvr_base_java") { |
13 aar_path = "src/libraries/base/base.aar" | 18 aar_path = "src/libraries/base/base.aar" |
14 } | 19 } |
15 | 20 |
16 android_aar_prebuilt("gvr_controller_java") { | 21 android_aar_prebuilt("gvr_controller_java") { |
17 aar_path = "src/libraries/controller/controller.aar" | 22 aar_path = "src/libraries/controller/controller.aar" |
18 } | 23 } |
19 | 24 |
20 source_set("libgvr") { | 25 source_set("libgvr") { |
21 deps = [ | 26 data_deps = [ |
22 ":libgvr_shared_library", | 27 ":libgvr_copy", |
23 ] | 28 ] |
24 libs = [ "$root_out_dir/libgvr.so" ] | 29 libs = [ "${root_out_dir}/libgvr.so" ] |
25 } | 30 } |
26 | 31 |
27 copy("libgvr_shared_library") { | 32 copy("libgvr_copy") { |
28 if (target_cpu == "arm") { | 33 sources = [ |
29 sources = [ | 34 "src/ndk-beta/lib/android_${gvr_arch}/libgvr.so", |
30 "src/ndk-beta/lib/android_arm/libgvr.so", | 35 ] |
31 ] | |
32 } else if (target_cpu == "arm64") { | |
33 sources = [ | |
34 "src/ndk-beta/lib/android_arm64/libgvr.so", | |
35 ] | |
36 } else if (target_cpu == "x86") { | |
37 sources = [ | |
38 "src/ndk-beta/lib/android_x86/libgvr.so", | |
39 ] | |
40 } else if (target_cpu == "x64") { | |
41 sources = [ | |
42 "src/ndk-beta/lib/android_x86_64/libgvr.so", | |
43 ] | |
44 } | |
45 outputs = [ | 36 outputs = [ |
46 "${root_out_dir}/libgvr.so", | 37 "${root_out_dir}/libgvr.so", |
47 ] | 38 ] |
48 } | 39 } |
49 | 40 |
50 config("libgvr_config") { | 41 config("libgvr_config") { |
51 include_dirs = [ "src/ndk-beta/include/" ] | 42 include_dirs = [ "src/ndk-beta/include/" ] |
52 } | 43 } |
OLD | NEW |