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 libevdev |
| 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_libevdev = true |
| 15 } |
| 16 |
| 17 if (!use_system_libevdev) { |
| 18 config("libevdev_config") { |
| 19 include_dirs = [ "src/include" ] |
| 20 } |
| 21 |
| 22 static_library("libevdev") { |
| 23 sources = [ |
| 24 "src/src/libevdev.c", |
| 25 "src/src/libevdev_event.c", |
| 26 "src/src/libevdev_mt.c", |
| 27 ] |
| 28 |
| 29 configs -= [ "//build/config/compiler:chromium_code" ] |
| 30 configs += [ "//build/config/compiler:no_chromium_code" ] |
| 31 |
| 32 public_configs = [ ":libevdev_config" ] |
| 33 } |
| 34 } |
| 35 |
| 36 if (use_system_libevdev) { |
| 37 pkg_config("libevdev-cros") { |
| 38 packages = [ "libevdev-cros" ] |
| 39 } |
| 40 |
| 41 group("libevdev") { |
| 42 public_configs = [ ":libevdev-cros" ] |
| 43 } |
| 44 } |
OLD | NEW |