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/linux/pkg_config.gni") |
| 6 |
| 7 assert(is_linux) |
| 8 |
| 9 declare_args() { |
| 10 # Controls whether the build should use the version of gestures |
| 11 # library shipped with the system. In release builds of Chrome OS we |
| 12 # use the system version, but when building on dev workstations we |
| 13 # bundle it because Ubuntu doesn't ship a usable version. |
| 14 use_system_gestures = true |
| 15 } |
| 16 |
| 17 if (!use_system_gestures) { |
| 18 config("gestures_config") { |
| 19 include_dirs = [ |
| 20 ".", |
| 21 "include", |
| 22 "//testing/gtest/include", |
| 23 ] |
| 24 } |
| 25 |
| 26 pkg_config("jsoncpp") { |
| 27 packages = [ "jsoncpp" ] |
| 28 } |
| 29 |
| 30 static_library("gestures") { |
| 31 sources = [ |
| 32 "gestures/src/accel_filter_interpreter.cc", |
| 33 "gestures/src/activity_log.cc", |
| 34 "gestures/src/box_filter_interpreter.cc", |
| 35 "gestures/src/click_wiggle_filter_interpreter.cc", |
| 36 "gestures/src/cr48_profile_sensor_filter_interpreter.cc", |
| 37 "gestures/src/file_util.cc", |
| 38 "gestures/src/filter_interpreter.cc", |
| 39 "gestures/src/finger_merge_filter_interpreter.cc", |
| 40 "gestures/src/finger_metrics.cc", |
| 41 "gestures/src/fling_stop_filter_interpreter.cc", |
| 42 "gestures/src/gestures.cc", |
| 43 "gestures/src/iir_filter_interpreter.cc", |
| 44 "gestures/src/immediate_interpreter.cc", |
| 45 "gestures/src/integral_gesture_filter_interpreter.cc", |
| 46 "gestures/src/interpreter.cc", |
| 47 "gestures/src/logging_filter_interpreter.cc", |
| 48 "gestures/src/lookahead_filter_interpreter.cc", |
| 49 "gestures/src/metrics_filter_interpreter.cc", |
| 50 "gestures/src/mouse_interpreter.cc", |
| 51 "gestures/src/multitouch_mouse_interpreter.cc", |
| 52 "gestures/src/non_linearity_filter_interpreter.cc", |
| 53 "gestures/src/palm_classifying_filter_interpreter.cc", |
| 54 "gestures/src/prop_registry.cc", |
| 55 "gestures/src/scaling_filter_interpreter.cc", |
| 56 "gestures/src/sensor_jump_filter_interpreter.cc", |
| 57 "gestures/src/split_correcting_filter_interpreter.cc", |
| 58 "gestures/src/stationary_wiggle_filter_interpreter.cc", |
| 59 "gestures/src/string_util.cc", |
| 60 "gestures/src/stuck_button_inhibitor_filter_interpreter.cc", |
| 61 "gestures/src/t5r2_correcting_filter_interpreter.cc", |
| 62 "gestures/src/trace_marker.cc", |
| 63 "gestures/src/tracer.cc", |
| 64 "gestures/src/trend_classifying_filter_interpreter.cc", |
| 65 "gestures/src/util.cc", |
| 66 ] |
| 67 |
| 68 defines = [ "GESTURES_INTERNAL=1" ] |
| 69 |
| 70 configs -= [ "//build/config/compiler:chromium_code" ] |
| 71 configs += [ |
| 72 "//build/config/compiler:no_chromium_code", |
| 73 ":jsoncpp", |
| 74 ] |
| 75 |
| 76 # gestures uses typeid. |
| 77 configs -= [ "//build/config/compiler:no_rtti" ] |
| 78 configs += [ "//build/config/compiler:rtti" ] |
| 79 |
| 80 if (is_clang) { |
| 81 # Suppress warnings from the Chromium Clang plugin. |
| 82 configs -= [ "//build/config/clang:find_bad_constructs" ] |
| 83 } |
| 84 |
| 85 public_configs = [ ":gestures_config" ] |
| 86 } |
| 87 } |
| 88 |
| 89 if (use_system_gestures) { |
| 90 pkg_config("libgestures") { |
| 91 packages = [ "libgestures" ] |
| 92 } |
| 93 |
| 94 group("gestures") { |
| 95 public_configs = [ ":libgestures" ] |
| 96 } |
| 97 } |
OLD | NEW |