Commit 304529e8 authored by spang's avatar spang Committed by Commit bot

ozone: Add initial build support for xkbcommon

This adds a use_xkbcommon variable that allows usage of libxkbcommon in
the build. Turn this on for linux ozone builds (except embedded builds).

BUG=430194
TEST=build

Review URL: https://codereview.chromium.org/751623003

Cr-Commit-Position: refs/heads/master@{#308204}
parent 19d2ebf9
......@@ -706,6 +706,13 @@
'use_dbus%': 0,
}],
# Libxkbcommon usage.
['use_ozone==1 and embedded==0', {
'use_xkbcommon%': 1,
}, {
'use_xkbcommon%': 0,
}],
# We always use skia text rendering in Aura on Windows, since GDI
# doesn't agree with our BackingStore.
# TODO(beng): remove once skia text rendering is on by default.
......@@ -1087,6 +1094,7 @@
'use_cairo%': '<(use_cairo)',
'use_ozone%': '<(use_ozone)',
'use_ozone_evdev%': '<(use_ozone_evdev)',
'use_xkbcommon%': '<(use_xkbcommon)',
'use_clipboard_aurax11%': '<(use_clipboard_aurax11)',
'desktop_linux%': '<(desktop_linux)',
'use_x11%': '<(use_x11)',
......
......@@ -465,6 +465,27 @@
},
],
}],
['use_xkbcommon==1', {
'targets': [
{
'target_name': 'xkbcommon',
'type': 'none',
'direct_dependent_settings': {
'cflags': [
'<!@(<(pkg-config) --cflags xkbcommon)'
],
},
'link_settings': {
'ldflags': [
'<!@(<(pkg-config) --libs-only-L --libs-only-other xkbcommon)',
],
'libraries': [
'<!@(<(pkg-config) --libs-only-l xkbcommon)',
],
},
},
],
}],
['ozone_platform_gbm==1', {
'targets': [
{
......
......@@ -3,8 +3,18 @@
# found in the LICENSE file.
import("//build/config/features.gni")
import("//build/config/linux/pkg_config.gni")
import("//build/config/ui.gni")
# Optional system libraries.
use_xkbcommon = use_ozone
if (use_xkbcommon) {
pkg_config("xkbcommon") {
packages = [ "xkbcommon" ]
}
}
component("events_ozone") {
sources = [
"chromeos/cursor_controller.cc",
......@@ -38,6 +48,12 @@ component("events_ozone") {
if (use_ozone_evdev && use_udev) {
deps += [ "//device/udev_linux" ]
}
if (use_xkbcommon) {
configs += [ ":xkbcommon" ]
defines += [ "USE_XKBCOMMON" ]
}
}
config("evdev") {
......
......@@ -36,6 +36,14 @@
['exclude', '_udev\\.(h|cc)$'],
],
}],
['use_xkbcommon==1', {
'dependencies': [
'../../../build/linux/system.gyp:xkbcommon',
],
'defines': [
'USE_XKBCOMMON',
],
}],
['use_ozone_evdev==1 and use_udev==1', {
'dependencies': [
'<(DEPTH)/device/udev_linux/udev.gyp:udev_linux',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment