OLD | NEW |
---|---|
(Empty) | |
1 # Copyright 2016 The Chromium Authors. All rights reserved. | |
Ken Rockot(use gerrit already)
2016/06/23 02:17:03
Missing gyp rules for all this? I know, I wish it
| |
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 | |
7 if (is_android) { | |
8 import("//build/config/android/config.gni") | |
9 import("//build/config/android/rules.gni") # For generate_jni(). | |
10 } | |
11 | |
12 component("gamepad") { | |
13 output_name = "device_gamepad" | |
14 | |
15 sources = [ | |
16 "gamepad_consumer.h", | |
17 "gamepad_data_fetcher.cc", | |
18 "gamepad_data_fetcher.h", | |
19 | |
20 #"gamepad_platform_data_fetcher.cc", | |
21 "gamepad_platform_data_fetcher.h", | |
22 "gamepad_platform_data_fetcher_android.cc", | |
23 "gamepad_platform_data_fetcher_android.h", | |
24 "gamepad_platform_data_fetcher_linux.cc", | |
25 "gamepad_platform_data_fetcher_linux.h", | |
26 "gamepad_platform_data_fetcher_mac.h", | |
27 "gamepad_platform_data_fetcher_mac.mm", | |
28 "gamepad_platform_data_fetcher_win.cc", | |
29 "gamepad_platform_data_fetcher_win.h", | |
30 "gamepad_provider.cc", | |
31 "gamepad_provider.h", | |
32 "gamepad_standard_mappings.cc", | |
33 "gamepad_standard_mappings.h", | |
34 "gamepad_standard_mappings_linux.cc", | |
35 "gamepad_standard_mappings_mac.mm", | |
36 "gamepad_standard_mappings_win.cc", | |
37 "gamepad_user_gesture.cc", | |
38 "gamepad_user_gesture.h", | |
39 "raw_input_data_fetcher_win.cc", | |
40 "raw_input_data_fetcher_win.h", | |
41 "xbox_data_fetcher_mac.cc", | |
42 "xbox_data_fetcher_mac.h", | |
43 ] | |
44 | |
45 deps = [ | |
46 "//base", | |
47 "//base/third_party/dynamic_annotations", | |
48 ] | |
49 | |
50 defines = [ "DEVICE_GAMEPAD_IMPLEMENTATION" ] | |
51 | |
52 if (is_win) { | |
53 cflags = [ "/wd4267" ] # conversion from 'size_t' (64 bit) to 'type'(32 bit ). | |
54 } | |
55 | |
56 if (is_linux && use_udev) { | |
57 deps += [ "//device/udev_linux" ] | |
58 } | |
59 | |
60 if (is_android) { | |
61 deps += [ ":jni_headers" ] | |
62 } | |
63 } | |
64 | |
65 static_library("test_helpers") { | |
66 testonly = true | |
67 | |
68 sources = [ | |
69 "gamepad_test_helpers.cc", | |
70 "gamepad_test_helpers.h", | |
71 ] | |
72 | |
73 public_deps = [ | |
74 ":gamepad", | |
75 "//base", | |
76 ] | |
77 } | |
78 | |
79 if (is_android) { | |
80 generate_jni("jni_headers") { | |
81 sources = [ | |
82 "android/java/src/org/chromium/device/gamepad/GamepadList.java", | |
83 ] | |
84 jni_package = "gamepad" | |
85 } | |
86 | |
87 android_library("java") { | |
88 java_files = [ | |
89 "android/java/src/org/chromium/device/gamepad/GamepadDevice.java", | |
90 "android/java/src/org/chromium/device/gamepad/GamepadList.java", | |
91 "android/java/src/org/chromium/device/gamepad/GamepadMappings.java", | |
92 ] | |
93 deps = [ | |
94 "//base:base_java", | |
95 ] | |
96 srcjar_deps = [ ":java_enums_srcjar" ] | |
97 } | |
98 | |
99 java_cpp_enum("java_enums_srcjar") { | |
100 sources = [ | |
101 "gamepad_standard_mappings.h", | |
102 ] | |
103 } | |
104 } | |
OLD | NEW |