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 component("vr") { |
| 13 output_name = "device_vr" |
| 14 |
| 15 sources = [ |
| 16 "vr_device.cc", |
| 17 "vr_device.h", |
| 18 "vr_device_manager.cc", |
| 19 "vr_device_manager.h", |
| 20 "vr_device_provider.h", |
| 21 ] |
| 22 |
| 23 deps = [ |
| 24 "//base", |
| 25 "//mojo/edk/system", |
| 26 "//mojo/public/cpp/bindings", |
| 27 "//third_party/WebKit/public:mojo_bindings", |
| 28 "//ui/gfx", |
| 29 ] |
| 30 |
| 31 defines = [ "DEVICE_VR_IMPLEMENTATION" ] |
| 32 |
| 33 if (is_android) { |
| 34 sources += [ |
| 35 "android/cardboard/cardboard_vr_device.cc", |
| 36 "android/cardboard/cardboard_vr_device.h", |
| 37 "android/cardboard/cardboard_vr_device_provider.cc", |
| 38 "android/cardboard/cardboard_vr_device_provider.h", |
| 39 ] |
| 40 |
| 41 deps += [ ":jni_headers" ] |
| 42 } |
| 43 } |
| 44 |
| 45 static_library("fakes") { |
| 46 testonly = true |
| 47 |
| 48 sources = [ |
| 49 "test/fake_vr_device.cc", |
| 50 "test/fake_vr_device.h", |
| 51 "test/fake_vr_device_provider.cc", |
| 52 "test/fake_vr_device_provider.h", |
| 53 ] |
| 54 |
| 55 public_deps = [ |
| 56 ":vr", |
| 57 "//base", |
| 58 "//mojo/public/cpp/bindings", |
| 59 "//third_party/WebKit/public:mojo_bindings", |
| 60 ] |
| 61 } |
| 62 |
| 63 if (is_android) { |
| 64 java_sources_needing_jni = |
| 65 [ "android/java/src/org/chromium/device/vr/CardboardVRDevice.java" ] |
| 66 |
| 67 generate_jni("jni_headers") { |
| 68 sources = java_sources_needing_jni |
| 69 jni_package = "vr" |
| 70 |
| 71 public_deps = [ |
| 72 "//third_party/cardboard-java:cardboard-java", |
| 73 ] |
| 74 } |
| 75 |
| 76 android_library("java") { |
| 77 java_files = java_sources_needing_jni |
| 78 deps = [ |
| 79 "//base:base_java", |
| 80 "//third_party/cardboard-java:cardboard-java", |
| 81 ] |
| 82 } |
| 83 } |
OLD | NEW |