[at-spi2-core] meson: x11 fixes
- From: Mike Gorse <mgorse src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [at-spi2-core] meson: x11 fixes
- Date: Tue, 24 Oct 2017 01:24:00 +0000 (UTC)
commit 70705839990f8eb5112b0262bb0960e806c62fbc
Author: Mike Gorse <mgorse alum wpi edu>
Date: Mon Oct 23 20:21:57 2017 -0500
meson: x11 fixes
Meson wasn't defining HAVE_X11, so x11 support wasn't being compiled even
if X was determined to be present.
Also, add an enable-x11 option (default is to auto-detect).
atspi/meson.build | 2 +-
bus/meson.build | 2 +-
meson.build | 28 ++++++++++++++++------------
meson_options.txt | 2 ++
registryd/meson.build | 19 +++++++++++--------
5 files changed, 31 insertions(+), 22 deletions(-)
---
diff --git a/atspi/meson.build b/atspi/meson.build
index 1ec3ecd..327134a 100644
--- a/atspi/meson.build
+++ b/atspi/meson.build
@@ -69,7 +69,7 @@ atspi_enum_h = atspi_enums[1]
atspi = shared_library('atspi', atspi_sources + atspi_enums,
include_directories: [ root_inc, registryd_inc ],
- dependencies: [ libdbus_dep, gobject_dep, dbind_dep ],
+ dependencies: [ libdbus_dep, gobject_dep, dbind_dep, x11_deps ],
install: true)
atspi_dep = declare_dependency(link_with: atspi,
diff --git a/bus/meson.build b/bus/meson.build
index 8e4673f..909103c 100644
--- a/bus/meson.build
+++ b/bus/meson.build
@@ -45,7 +45,7 @@ endif
executable('at-spi-bus-launcher', 'at-spi-bus-launcher.c',
include_directories: [ root_inc, include_directories('.') ],
- dependencies: [ gio_dep ],
+ dependencies: [ gio_dep, x11_deps ],
c_args: [
'-DSYSCONFDIR="@0@"'.format(atspi_sysconfdir),
'-DDATADIR="@0@"'.format(atspi_datadir),
diff --git a/meson.build b/meson.build
index e746e14..4eac857 100644
--- a/meson.build
+++ b/meson.build
@@ -53,21 +53,25 @@ glib_dep = dependency('glib-2.0', version: glib_req_version)
gobject_dep = dependency('gobject-2.0', version: gobject_req_version)
gio_dep = dependency('gio-2.0', version: gio_req_version)
dl_dep = cc.find_library('dl', required: false)
-x11_dep = dependency('x11', required: false)
x11_deps = []
-if x11_dep.found()
- x11_deps += x11_dep
-
- xtest_dep = dependency('xtst')
- x11_deps += xtest_dep
-
- if cc.has_function('XkbGetMap', dependencies: x11_deps)
- at_spi_conf.set('HAVE_XKB', 1)
+x11_option = get_option('enable-x11')
+if x11_option != 'no'
+ x11_dep = dependency('x11', required: false)
+
+ if x11_dep.found()
+ x11_deps += x11_dep
+ at_spi_conf.set('HAVE_X11', 1)
+ xtest_dep = dependency('xtst')
+ x11_deps += xtest_dep
+
+ if cc.has_function('XkbGetMap', dependencies: x11_deps)
+ at_spi_conf.set('HAVE_XKB', 1)
+ endif
+
+ xinput_dep = dependency('xi')
+ x11_deps += xinput_dep
endif
-
- xinput_dep = dependency('xi')
- x11_deps += xinput_dep
endif
# Alignments
diff --git a/meson_options.txt b/meson_options.txt
index 305fc8c..c9afe2f 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -16,3 +16,5 @@ option('enable_docs',
value: false)
option('enable-introspection', type: 'combo', choices: ['yes', 'no', 'auto'], value: 'auto', description:
'Enable GObject Introspection (depends on GObject)')
+
+option('enable-x11', type: 'combo', choices: ['yes', 'no', 'auto'], value: 'auto', description: 'Enable X11
support')
diff --git a/registryd/meson.build b/registryd/meson.build
index 5de6902..eb8236e 100644
--- a/registryd/meson.build
+++ b/registryd/meson.build
@@ -16,15 +16,18 @@ registryd_deps = [
dl_dep,
]
-if x11_dep.found()
- registryd_sources += [
- 'deviceeventcontroller-x11.c',
- 'display.c',
- 'event-source.c',
- 'ucs2keysym.c',
- ]
+x11_option = get_option('enable-x11')
+if x11_option != 'no'
+ if x11_dep.found()
+ registryd_sources += [
+ 'deviceeventcontroller-x11.c',
+ 'display.c',
+ 'event-source.c',
+ 'ucs2keysym.c',
+ ]
- registryd_deps += x11_deps
+ registryd_deps += x11_deps
+ endif
endif
executable('at-spi2-registryd', registryd_sources,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]