Chromium Code Reviews| Index: device/vr/BUILD.gn |
| diff --git a/device/vr/BUILD.gn b/device/vr/BUILD.gn |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..41cfb35dab4d5cf1ca151054dfe504c2a05ff2ea |
| --- /dev/null |
| +++ b/device/vr/BUILD.gn |
| @@ -0,0 +1,85 @@ |
| +# Copyright 2016 The Chromium Authors. All rights reserved. |
| +# Use of this source code is governed by a BSD-style license that can be |
| +# found in the LICENSE file. |
| + |
| +import("//build/config/features.gni") |
| +import("//mojo/public/tools/bindings/mojom.gni") |
| + |
| +if (is_android) { |
| + import("//build/config/android/rules.gni") # For generate_jni(). |
| +} |
| + |
| +common_sources = [ |
| + "vr_device.cc", |
| + "vr_device.h", |
| + "vr_device_manager.cc", |
| + "vr_device_manager.h", |
| + "vr_device_provider.h", |
| +] |
| + |
| +component("vr") { |
| + output_name = "device_vr" |
| + |
| + sources = common_sources |
| + |
| + deps = [ |
| + "//base", |
| + "//mojo/edk/system", |
| + "//mojo/public/cpp/bindings", |
| + "//third_party/WebKit/public:mojo_bindings", |
| + "//ui/gfx", |
| + ] |
| + |
| + defines = [ "DEVICE_VR_IMPLEMENTATION" ] |
| + |
| + if (is_android) { |
| + sources += [ |
| + "android/cardboard/cardboard_vr_device.cc", |
| + "android/cardboard/cardboard_vr_device.h", |
| + "android/cardboard/cardboard_vr_device_provider.cc", |
| + "android/cardboard/cardboard_vr_device_provider.h", |
| + ] |
| + |
| + deps += [ ":jni_headers" ] |
| + } |
| +} |
| + |
| +static_library("fakes") { |
| + testonly = true |
| + sources = common_sources |
|
Reilly Grant (use Gerrit)
2016/06/01 21:42:24
This should just depend on :vr. Otherwise you are
|
| + |
| + sources += [ |
| + "test/fake_vr_device.cc", |
| + "test/fake_vr_device.h", |
| + "test/fake_vr_device_provider.cc", |
| + "test/fake_vr_device_provider.h", |
| + ] |
| + |
| + public_deps = [ |
| + "//base", |
| + "//mojo/public/cpp/bindings", |
| + "//third_party/WebKit/public:mojo_bindings", |
| + ] |
| +} |
| + |
| +if (is_android) { |
| + java_sources_needing_jni = |
| + [ "android/java/src/org/chromium/device/vr/CardboardVRDevice.java" ] |
| + |
| + generate_jni("jni_headers") { |
| + sources = java_sources_needing_jni |
| + jni_package = "vr" |
| + |
| + public_deps = [ |
| + "//third_party/cardboard-java:cardboard-java", |
| + ] |
| + } |
| + |
| + android_library("java") { |
| + java_files = java_sources_needing_jni |
| + deps = [ |
| + "//base:base_java", |
| + "//third_party/cardboard-java:cardboard-java", |
| + ] |
| + } |
| +} |