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