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/features.gni") | 5 import("//build/config/features.gni") |
6 import("//mojo/public/tools/bindings/mojom.gni") | 6 import("//mojo/public/tools/bindings/mojom.gni") |
7 | 7 |
8 if (is_android) { | 8 if (is_android) { |
9 import("//build/config/android/rules.gni") # For generate_jni(). | 9 import("//build/config/android/rules.gni") # For generate_jni(). |
10 } | 10 } |
11 | 11 |
12 if (current_cpu == "arm" || current_cpu == "arm64") { | 12 if (enable_webvr) { |
13 component("vr") { | 13 component("vr") { |
14 output_name = "device_vr" | 14 output_name = "device_vr" |
15 | 15 |
16 sources = [ | 16 sources = [ |
17 "vr_device.cc", | 17 "vr_device.cc", |
18 "vr_device.h", | 18 "vr_device.h", |
19 "vr_device_manager.cc", | 19 "vr_device_manager.cc", |
20 "vr_device_manager.h", | 20 "vr_device_manager.h", |
21 "vr_device_provider.h", | 21 "vr_device_provider.h", |
22 "vr_display_impl.cc", | 22 "vr_display_impl.cc", |
23 "vr_display_impl.h", | 23 "vr_display_impl.h", |
| 24 "vr_export.h", |
24 "vr_service_impl.cc", | 25 "vr_service_impl.cc", |
25 "vr_service_impl.h", | 26 "vr_service_impl.h", |
26 ] | 27 ] |
27 | 28 |
28 deps = [ | 29 deps = [ |
29 ":mojo_bindings", | 30 ":mojo_bindings", |
30 "//base", | 31 "//base", |
31 "//mojo/public/cpp/bindings", | 32 "//mojo/public/cpp/bindings", |
32 "//ui/gfx", | 33 "//ui/gfx", |
33 ] | 34 ] |
34 | 35 |
35 defines = [ "DEVICE_VR_IMPLEMENTATION" ] | 36 defines = [ "DEVICE_VR_IMPLEMENTATION" ] |
36 | 37 if (is_android && (current_cpu == "arm" || current_cpu == "arm64")) { |
37 if (is_android) { | |
38 sources += [ | 38 sources += [ |
39 "android/gvr/gvr_delegate.cc", | 39 "android/gvr/gvr_delegate.cc", |
40 "android/gvr/gvr_delegate.h", | 40 "android/gvr/gvr_delegate.h", |
41 "android/gvr/gvr_device.cc", | 41 "android/gvr/gvr_device.cc", |
42 "android/gvr/gvr_device.h", | 42 "android/gvr/gvr_device.h", |
43 "android/gvr/gvr_device_provider.cc", | 43 "android/gvr/gvr_device_provider.cc", |
44 "android/gvr/gvr_device_provider.h", | 44 "android/gvr/gvr_device_provider.h", |
45 "android/gvr/gvr_gamepad_data_fetcher.cc", | 45 "android/gvr/gvr_gamepad_data_fetcher.cc", |
46 "android/gvr/gvr_gamepad_data_fetcher.h", | 46 "android/gvr/gvr_gamepad_data_fetcher.h", |
47 ] | 47 ] |
(...skipping 22 matching lines...) Expand all Loading... |
70 "test/fake_vr_service_client.h", | 70 "test/fake_vr_service_client.h", |
71 ] | 71 ] |
72 | 72 |
73 public_deps = [ | 73 public_deps = [ |
74 ":mojo_bindings", | 74 ":mojo_bindings", |
75 ":vr", | 75 ":vr", |
76 "//base", | 76 "//base", |
77 "//mojo/public/cpp/bindings", | 77 "//mojo/public/cpp/bindings", |
78 ] | 78 ] |
79 } | 79 } |
| 80 } else { |
| 81 component("mojo_only") { |
| 82 sources = [ |
| 83 # We need to include an empty .cc file so that mac and windows don't fall
over when trying to |
| 84 # compile this. |
| 85 "empty.cc", |
| 86 "vr_export.h", |
| 87 ] |
| 88 defines = [ "DEVICE_VR_IMPLEMENTATION" ] |
| 89 public_deps = [ |
| 90 ":mojo_bindings", |
| 91 ] |
| 92 } |
80 } | 93 } |
81 | 94 |
82 mojom("mojo_bindings") { | 95 mojom("mojo_bindings") { |
83 sources = [ | 96 sources = [ |
84 "vr_service.mojom", | 97 "vr_service.mojom", |
85 ] | 98 ] |
| 99 |
| 100 public_deps = [ |
| 101 "//mojo/common:common_custom_types", |
| 102 ] |
| 103 |
| 104 export_class_attribute = "DEVICE_VR_EXPORT" |
| 105 export_define = "DEVICE_VR_IMPLEMENTATION=1" |
| 106 export_header = "device/vr/vr_export.h" |
86 } | 107 } |
OLD | NEW |