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/ui.gni") | 5 import("//build/config/ui.gni") |
6 import("//ui/ozone/ozone.gni") | 6 import("//ui/ozone/ozone.gni") |
7 | 7 |
8 source_set("xkb") { | 8 source_set("xkb") { |
9 sources = [ | 9 sources = [ |
10 "keyboard_code_conversion_xkb.cc", | 10 "keyboard_code_conversion_xkb.cc", |
11 "keyboard_code_conversion_xkb.h", | 11 "keyboard_code_conversion_xkb.h", |
12 "scoped_xkb.h", | 12 "scoped_xkb.h", |
13 "xkb_keysym.h", | 13 "xkb_keysym.h", |
14 ] | 14 ] |
15 | 15 |
16 deps = [ | 16 deps = [ |
17 "//base", | 17 "//base", |
18 "//ui/events:dom_keycode_converter", | 18 "//ui/events:dom_keycode_converter", |
19 ] | 19 ] |
| 20 |
| 21 if (use_xkbcommon) { |
| 22 defines = [ "USE_XKBCOMMON" ] |
| 23 } |
20 } | 24 } |
21 | 25 |
22 if (use_x11 || ozone_platform_x11) { | 26 if (use_x11 || ozone_platform_x11) { |
23 component("x11") { | 27 component("x11") { |
24 output_name = "keycodes_x11" | 28 output_name = "keycodes_x11" |
25 | 29 |
26 sources = [ | 30 sources = [ |
27 "keyboard_code_conversion_x.cc", | 31 "keyboard_code_conversion_x.cc", |
28 "keyboard_code_conversion_x.h", | 32 "keyboard_code_conversion_x.h", |
29 "keycodes_x_export.h", | 33 "keycodes_x_export.h", |
30 "keysym_to_unicode.cc", | 34 "keysym_to_unicode.cc", |
31 "keysym_to_unicode.h", | 35 "keysym_to_unicode.h", |
32 ] | 36 ] |
33 | 37 |
34 defines = [ "KEYCODES_X_IMPLEMENTATION" ] | 38 defines = [ "KEYCODES_X_IMPLEMENTATION" ] |
35 | 39 |
36 deps = [ | 40 deps = [ |
37 ":xkb", | 41 ":xkb", |
38 "//base", | 42 "//base", |
39 "//ui/events:dom_keycode_converter", | 43 "//ui/events:dom_keycode_converter", |
40 "//ui/gfx/x", | 44 "//ui/gfx/x", |
41 ] | 45 ] |
42 | 46 |
43 configs += [ "//build/config/linux:x11" ] | 47 configs += [ "//build/config/linux:x11" ] |
44 } | 48 } |
45 } | 49 } |
OLD | NEW |