OLD | NEW |
---|---|
(Empty) | |
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 | |
3 # found in the LICENSE file. | |
4 | |
5 import("//build/config/features.gni") | |
6 import("//mojo/public/tools/bindings/mojom.gni") | |
7 | |
8 if (is_android) { | |
9 import("//build/config/android/rules.gni") # For generate_jni(). | |
10 } | |
11 | |
12 common_sources = [ | |
13 "vr_device.cc", | |
14 "vr_device.h", | |
15 "vr_device_manager.cc", | |
16 "vr_device_manager.h", | |
17 "vr_device_provider.h", | |
18 ] | |
19 | |
20 component("vr") { | |
21 output_name = "device_vr" | |
22 | |
23 sources = common_sources | |
24 | |
25 deps = [ | |
26 "//base", | |
27 "//mojo/edk/system", | |
28 "//mojo/public/cpp/bindings", | |
29 "//third_party/WebKit/public:mojo_bindings", | |
30 "//ui/gfx", | |
31 ] | |
32 | |
33 defines = [ "DEVICE_VR_IMPLEMENTATION" ] | |
34 | |
35 if (is_android) { | |
36 sources += [ | |
37 "android/cardboard/cardboard_vr_device.cc", | |
38 "android/cardboard/cardboard_vr_device.h", | |
39 "android/cardboard/cardboard_vr_device_provider.cc", | |
40 "android/cardboard/cardboard_vr_device_provider.h", | |
41 ] | |
42 | |
43 deps += [ ":jni_headers" ] | |
44 } | |
45 } | |
46 | |
47 static_library("fakes") { | |
48 testonly = true | |
49 sources = common_sources | |
Reilly Grant (use Gerrit)
2016/06/01 21:42:24
This should just depend on :vr. Otherwise you are
| |
50 | |
51 sources += [ | |
52 "test/fake_vr_device.cc", | |
53 "test/fake_vr_device.h", | |
54 "test/fake_vr_device_provider.cc", | |
55 "test/fake_vr_device_provider.h", | |
56 ] | |
57 | |
58 public_deps = [ | |
59 "//base", | |
60 "//mojo/public/cpp/bindings", | |
61 "//third_party/WebKit/public:mojo_bindings", | |
62 ] | |
63 } | |
64 | |
65 if (is_android) { | |
66 java_sources_needing_jni = | |
67 [ "android/java/src/org/chromium/device/vr/CardboardVRDevice.java" ] | |
68 | |
69 generate_jni("jni_headers") { | |
70 sources = java_sources_needing_jni | |
71 jni_package = "vr" | |
72 | |
73 public_deps = [ | |
74 "//third_party/cardboard-java:cardboard-java", | |
75 ] | |
76 } | |
77 | |
78 android_library("java") { | |
79 java_files = java_sources_needing_jni | |
80 deps = [ | |
81 "//base:base_java", | |
82 "//third_party/cardboard-java:cardboard-java", | |
83 ] | |
84 } | |
85 } | |
OLD | NEW |