Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(414)

Side by Side Diff: device/vr/BUILD.gn

Issue 2662583003: Clean up device/vr BUILD file. (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/renderer/BUILD.gn ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 (enable_webvr) { 12 component("vr") {
13 component("vr") { 13 output_name = "device_vr"
14 output_name = "device_vr"
15 14
16 sources = [ 15 sources = [
16 "vr_export.h",
17 ]
18 defines = [ "DEVICE_VR_IMPLEMENTATION" ]
19 deps = [
20 ":mojo_bindings",
21 ]
22
23 if (!enable_webvr) {
24 sources += [
25 # We need to include an empty .cc file so that mac and windows don't fall over when trying to
26 # compile this when webvr is disabled.
27 "empty.cc",
28 ]
29 } else {
30 sources += [
17 "vr_device.cc", 31 "vr_device.cc",
18 "vr_device.h", 32 "vr_device.h",
19 "vr_device_manager.cc", 33 "vr_device_manager.cc",
20 "vr_device_manager.h", 34 "vr_device_manager.h",
21 "vr_device_provider.h", 35 "vr_device_provider.h",
22 "vr_display_impl.cc", 36 "vr_display_impl.cc",
23 "vr_display_impl.h", 37 "vr_display_impl.h",
24 "vr_export.h", 38 "vr_export.h",
25 "vr_service_impl.cc", 39 "vr_service_impl.cc",
26 "vr_service_impl.h", 40 "vr_service_impl.h",
27 ] 41 ]
28 42
29 deps = [ 43 deps += [
30 ":mojo_bindings",
31 "//base", 44 "//base",
32 "//mojo/public/cpp/bindings", 45 "//mojo/public/cpp/bindings",
33 "//ui/gfx", 46 "//ui/gfx",
34 ] 47 ]
35 48
36 defines = [ "DEVICE_VR_IMPLEMENTATION" ]
37 if (is_android && (current_cpu == "arm" || current_cpu == "arm64")) { 49 if (is_android && (current_cpu == "arm" || current_cpu == "arm64")) {
38 sources += [ 50 sources += [
39 "android/gvr/gvr_delegate.cc", 51 "android/gvr/gvr_delegate.cc",
40 "android/gvr/gvr_delegate.h", 52 "android/gvr/gvr_delegate.h",
41 "android/gvr/gvr_device.cc", 53 "android/gvr/gvr_device.cc",
42 "android/gvr/gvr_device.h", 54 "android/gvr/gvr_device.h",
43 "android/gvr/gvr_device_provider.cc", 55 "android/gvr/gvr_device_provider.cc",
44 "android/gvr/gvr_device_provider.h", 56 "android/gvr/gvr_device_provider.h",
45 "android/gvr/gvr_gamepad_data_fetcher.cc", 57 "android/gvr/gvr_gamepad_data_fetcher.cc",
46 "android/gvr/gvr_gamepad_data_fetcher.h", 58 "android/gvr/gvr_gamepad_data_fetcher.h",
47 ] 59 ]
48 60
49 deps += [ 61 deps += [
50 "//device/gamepad", 62 "//device/gamepad",
51 "//third_party/WebKit/public:blink_headers", 63 "//third_party/WebKit/public:blink_headers",
52 ] 64 ]
53 ldflags = [ "-landroid" ] 65 ldflags = [ "-landroid" ]
54 libs = [ "//third_party/gvr-android-sdk/libgvr_shim_static_${current_cpu}. a" ] 66 libs = [ "//third_party/gvr-android-sdk/libgvr_shim_static_${current_cpu}. a" ]
55 configs += [ "//third_party/gvr-android-sdk:libgvr_config" ] 67 configs += [ "//third_party/gvr-android-sdk:libgvr_config" ]
56 } 68 }
57 } 69 }
70 }
58 71
72 if (enable_webvr) {
59 static_library("fakes") { 73 static_library("fakes") {
60 testonly = true 74 testonly = true
61 75
62 sources = [ 76 sources = [
63 "test/fake_vr_device.cc", 77 "test/fake_vr_device.cc",
64 "test/fake_vr_device.h", 78 "test/fake_vr_device.h",
65 "test/fake_vr_device_provider.cc", 79 "test/fake_vr_device_provider.cc",
66 "test/fake_vr_device_provider.h", 80 "test/fake_vr_device_provider.h",
67 "test/fake_vr_display_impl_client.cc", 81 "test/fake_vr_display_impl_client.cc",
68 "test/fake_vr_display_impl_client.h", 82 "test/fake_vr_display_impl_client.h",
69 "test/fake_vr_service_client.cc", 83 "test/fake_vr_service_client.cc",
70 "test/fake_vr_service_client.h", 84 "test/fake_vr_service_client.h",
71 ] 85 ]
72 86
73 public_deps = [ 87 public_deps = [
74 ":mojo_bindings", 88 ":mojo_bindings",
75 ":vr", 89 ":vr",
76 "//base", 90 "//base",
77 "//mojo/public/cpp/bindings", 91 "//mojo/public/cpp/bindings",
78 ] 92 ]
79 } 93 }
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 }
93 } 94 }
94 95
95 mojom("mojo_bindings") { 96 mojom("mojo_bindings") {
96 sources = [ 97 sources = [
97 "vr_service.mojom", 98 "vr_service.mojom",
98 ] 99 ]
99 100
100 public_deps = [ 101 public_deps = [
101 "//mojo/common:common_custom_types", 102 "//mojo/common:common_custom_types",
102 ] 103 ]
103 104
104 export_class_attribute = "DEVICE_VR_EXPORT" 105 export_class_attribute = "DEVICE_VR_EXPORT"
105 export_define = "DEVICE_VR_IMPLEMENTATION=1" 106 export_define = "DEVICE_VR_IMPLEMENTATION=1"
106 export_header = "device/vr/vr_export.h" 107 export_header = "device/vr/vr_export.h"
107 } 108 }
OLDNEW
« no previous file with comments | « content/renderer/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698