[at-spi2-core: 1/4] meson: Change x11 option to feature
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [at-spi2-core: 1/4] meson: Change x11 option to feature
- Date: Wed, 28 Sep 2022 01:36:43 +0000 (UTC)
commit f659aab5b5db859d389f82b3d4a1a4a7b13ed849
Author: Xavier Claessens <xavier claessens collabora com>
Date: Mon Sep 12 13:37:42 2022 -0400
meson: Change x11 option to feature
atspi/meson.build | 9 +++------
meson.build | 28 ++++++++++------------------
meson_options.txt | 3 +--
registryd/meson.build | 19 ++++++++-----------
4 files changed, 22 insertions(+), 37 deletions(-)
---
diff --git a/atspi/meson.build b/atspi/meson.build
index bd8dbb19..e9d2882b 100644
--- a/atspi/meson.build
+++ b/atspi/meson.build
@@ -60,12 +60,9 @@ atspi_headers = [
'atspi-value.h',
]
-x11_option = get_option('x11')
-if x11_option != 'no'
- if x11_dep.found()
- atspi_sources += ['atspi-device-x11.c']
- atspi_headers += ['atspi-device-x11.h']
- endif
+if x11_dep.found()
+ atspi_sources += ['atspi-device-x11.c']
+ atspi_headers += ['atspi-device-x11.h']
endif
atspi_includedir = join_paths(get_option('prefix'), get_option('includedir'), 'at-spi-2.0', 'atspi')
diff --git a/meson.build b/meson.build
index 6dd6e8cb..3131538c 100644
--- a/meson.build
+++ b/meson.build
@@ -141,25 +141,17 @@ gmodule_dep = dependency('gmodule-2.0', version: gmodule_req_version)
libxml_dep = dependency('libxml-2.0', version: libxml_req_version)
x11_deps = []
-x11_option = get_option('x11')
-# ensure x11_dep is defined for use elsewhere, such as bus/meson.build
-x11_dep = dependency('', required: false)
-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
+x11_dep = dependency('x11', required: get_option('x11'))
+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
# Alignments
diff --git a/meson_options.txt b/meson_options.txt
index 7b647baf..b4374515 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -30,8 +30,7 @@ option('introspection',
value: 'auto')
option('x11',
description: 'Enable X11 support',
- type: 'combo',
- choices: ['yes', 'no', 'auto'],
+ type: 'feature',
value: 'auto')
option('disable_p2p',
description: 'Disable peer-to-peer DBus connections for at-spi2-atk',
diff --git a/registryd/meson.build b/registryd/meson.build
index bc721dc7..961372cf 100644
--- a/registryd/meson.build
+++ b/registryd/meson.build
@@ -16,18 +16,15 @@ registryd_deps = [
dl_dep,
]
-x11_option = get_option('x11')
-if x11_option != 'no'
- if x11_dep.found()
- registryd_sources += [
- 'deviceeventcontroller-x11.c',
- 'display.c',
- 'event-source.c',
- 'ucs2keysym.c',
- ]
+if x11_dep.found()
+ registryd_sources += [
+ 'deviceeventcontroller-x11.c',
+ 'display.c',
+ 'event-source.c',
+ 'ucs2keysym.c',
+ ]
- registryd_deps += x11_deps
- endif
+ registryd_deps += x11_deps
endif
executable('at-spi2-registryd', registryd_sources,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]