| 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 | 6 |
| 7 if (is_android) { | 7 if (is_android) { |
| 8 import("//build/config/android/config.gni") | 8 import("//build/config/android/config.gni") |
| 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 component("gamepad") { | 12 component("gamepad") { |
| 13 output_name = "device_gamepad" | 13 output_name = "device_gamepad" |
| 14 | 14 |
| 15 sources = [ | 15 sources = [ |
| 16 "gamepad_consumer.cc", | 16 "gamepad_consumer.cc", |
| 17 "gamepad_consumer.h", | 17 "gamepad_consumer.h", |
| 18 "gamepad_data_fetcher.cc", | 18 "gamepad_data_fetcher.cc", |
| 19 "gamepad_data_fetcher.h", | 19 "gamepad_data_fetcher.h", |
| 20 "gamepad_data_fetcher_manager.cc", |
| 21 "gamepad_data_fetcher_manager.h", |
| 20 "gamepad_platform_data_fetcher.h", | 22 "gamepad_platform_data_fetcher.h", |
| 21 "gamepad_platform_data_fetcher_android.cc", | 23 "gamepad_platform_data_fetcher_android.cc", |
| 22 "gamepad_platform_data_fetcher_android.h", | 24 "gamepad_platform_data_fetcher_android.h", |
| 23 "gamepad_platform_data_fetcher_linux.cc", | 25 "gamepad_platform_data_fetcher_linux.cc", |
| 24 "gamepad_platform_data_fetcher_linux.h", | 26 "gamepad_platform_data_fetcher_linux.h", |
| 25 "gamepad_platform_data_fetcher_mac.h", | 27 "gamepad_platform_data_fetcher_mac.h", |
| 26 "gamepad_platform_data_fetcher_mac.mm", | 28 "gamepad_platform_data_fetcher_mac.mm", |
| 27 "gamepad_platform_data_fetcher_win.cc", | 29 "gamepad_platform_data_fetcher_win.cc", |
| 28 "gamepad_platform_data_fetcher_win.h", | 30 "gamepad_platform_data_fetcher_win.h", |
| 29 "gamepad_provider.cc", | 31 "gamepad_provider.cc", |
| 30 "gamepad_provider.h", | 32 "gamepad_provider.h", |
| 31 "gamepad_standard_mappings.cc", | 33 "gamepad_standard_mappings.cc", |
| 32 "gamepad_standard_mappings.h", | 34 "gamepad_standard_mappings.h", |
| 33 "gamepad_standard_mappings_linux.cc", | 35 "gamepad_standard_mappings_linux.cc", |
| 34 "gamepad_standard_mappings_mac.mm", | 36 "gamepad_standard_mappings_mac.mm", |
| 35 "gamepad_standard_mappings_win.cc", | 37 "gamepad_standard_mappings_win.cc", |
| 36 "gamepad_user_gesture.cc", | 38 "gamepad_user_gesture.cc", |
| 37 "gamepad_user_gesture.h", | 39 "gamepad_user_gesture.h", |
| 38 "raw_input_data_fetcher_win.cc", | 40 "raw_input_data_fetcher_win.cc", |
| 39 "raw_input_data_fetcher_win.h", | 41 "raw_input_data_fetcher_win.h", |
| 40 "xbox_data_fetcher_mac.cc", | |
| 41 "xbox_data_fetcher_mac.h", | 42 "xbox_data_fetcher_mac.h", |
| 43 "xbox_data_fetcher_mac.mm", |
| 42 ] | 44 ] |
| 43 | 45 |
| 44 deps = [ | 46 deps = [ |
| 45 "//base", | 47 "//base", |
| 46 "//base/third_party/dynamic_annotations", | 48 "//base/third_party/dynamic_annotations", |
| 47 "//third_party/WebKit/public:blink_headers", | 49 "//third_party/WebKit/public:blink_headers", |
| 48 ] | 50 ] |
| 49 | 51 |
| 50 defines = [ "DEVICE_GAMEPAD_IMPLEMENTATION" ] | 52 defines = [ "DEVICE_GAMEPAD_IMPLEMENTATION" ] |
| 51 | 53 |
| 52 if (is_win) { | 54 if (is_win) { |
| 53 cflags = [ "/wd4267" ] # conversion from 'size_t' (64 bit) to 'type'(32 bit
). | 55 cflags = [ "/wd4267" ] # conversion from 'size_t' (64 bit) to 'type'(32 bit
). |
| 54 } | 56 } |
| 55 | 57 |
| 56 if (is_linux && use_udev) { | 58 if (is_linux && use_udev) { |
| 57 deps += [ "//device/udev_linux" ] | 59 deps += [ "//device/udev_linux" ] |
| 58 } else if (!is_win && !is_mac && !is_android) { | 60 } else if (!is_win && !is_mac && !is_android) { |
| 59 sources += [ "gamepad_platform_data_fetcher.cc" ] | |
| 60 sources -= [ "gamepad_platform_data_fetcher_linux.cc" ] | 61 sources -= [ "gamepad_platform_data_fetcher_linux.cc" ] |
| 61 } | 62 } |
| 62 | 63 |
| 63 if (is_android) { | 64 if (is_android) { |
| 64 deps += [ ":jni_headers" ] | 65 deps += [ ":jni_headers" ] |
| 65 } | 66 } |
| 66 | 67 |
| 67 if (is_mac) { | 68 if (is_mac) { |
| 68 libs = [ | 69 libs = [ |
| 69 "CoreFoundation.framework", | 70 "CoreFoundation.framework", |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 ] | 108 ] |
| 108 srcjar_deps = [ ":java_enums_srcjar" ] | 109 srcjar_deps = [ ":java_enums_srcjar" ] |
| 109 } | 110 } |
| 110 | 111 |
| 111 java_cpp_enum("java_enums_srcjar") { | 112 java_cpp_enum("java_enums_srcjar") { |
| 112 sources = [ | 113 sources = [ |
| 113 "gamepad_standard_mappings.h", | 114 "gamepad_standard_mappings.h", |
| 114 ] | 115 ] |
| 115 } | 116 } |
| 116 } | 117 } |
| OLD | NEW |