summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorey Halpin <chalpin@cs.wisc.edu>2023-03-08 19:54:16 -0600
committerCorey Halpin <chalpin@cs.wisc.edu>2023-03-08 19:54:16 -0600
commit20ee2e533794e0d5a3437e5b272da0a648d73c3e (patch)
tree71ae67f3ee7516e9211259cf39c5f6dd699b4998
parent5ded5022d0d542273ef6dcf2f24874c6a32e9a0c (diff)
downloadat-spi2-core-20ee2e533794e0d5a3437e5b272da0a648d73c3e.tar.gz
Add atk_only option to enable building a stub atk library
When built with atk_only, a stub library will be produced that can be used to satisfy package dependencies but provides no functionality.
-rw-r--r--meson.build40
-rw-r--r--meson_options.txt4
2 files changed, 28 insertions, 16 deletions
diff --git a/meson.build b/meson.build
index c83059fd..d938e093 100644
--- a/meson.build
+++ b/meson.build
@@ -127,7 +127,10 @@ gmodule_req_version = '>= 2.0.0'
gio_req_version = '>= 2.28.0'
libxml_req_version = '>= 2.9.1'
-libdbus_dep = dependency('dbus-1', version: libdbus_req_version)
+if not get_option('atk_only')
+ libdbus_dep = dependency('dbus-1', version: libdbus_req_version)
+endif
+
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)
@@ -166,10 +169,12 @@ dbus_alignments = [
'dbus_int64_t',
]
-foreach a: dbus_alignments
- at_spi_conf.set('ALIGNOF_' + a.underscorify().to_upper(),
- cc.alignment(a, prefix: '#include <dbus/dbus.h>', dependencies: libdbus_dep))
-endforeach
+if not get_option('atk_only')
+ foreach a: dbus_alignments
+ at_spi_conf.set('ALIGNOF_' + a.underscorify().to_upper(),
+ cc.alignment(a, prefix: '#include <dbus/dbus.h>', dependencies: libdbus_dep))
+ endforeach
+endif
at_spi_conf.set('ALIGNOF_DBIND_POINTER', cc.alignment('dbind_pointer', prefix: 'typedef void *dbind_pointer;'))
at_spi_conf.set('ALIGNOF_DBIND_STRUCT', cc.alignment('dbind_struct', prefix: 'typedef struct { char s1; } dbind_struct;'))
@@ -191,18 +196,21 @@ else
p2p_cflags = []
endif
-install_data('at-spi2-atk.desktop',
- install_dir: join_paths(get_option('libdir'), 'gnome-settings-daemon-3.0', 'gtk-modules'))
-
-subdir('xml')
-subdir('dbind')
-subdir('atspi')
-subdir('bus')
-subdir('registryd')
subdir('atk')
-subdir('droute')
-subdir('atk-adaptor')
-subdir('tests')
+
+if not get_option('atk_only')
+ install_data('at-spi2-atk.desktop',
+ install_dir: join_paths(get_option('libdir'), 'gnome-settings-daemon-3.0', 'gtk-modules'))
+
+ subdir('xml')
+ subdir('dbind')
+ subdir('atspi')
+ subdir('bus')
+ subdir('registryd')
+ subdir('droute')
+ subdir('atk-adaptor')
+ subdir('tests')
+endif
if get_option('docs')
subdir('doc')
diff --git a/meson_options.txt b/meson_options.txt
index 11cde7bc..548cdf7e 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -36,3 +36,7 @@ option('disable_p2p',
description: 'Disable peer-to-peer DBus connections for at-spi2-atk',
type: 'boolean',
value: false)
+option('atk_only',
+ description: 'Build only the ATK stub library without atspi or at-spi2-atk (UNSUPPORTED)',
+ type: 'boolean',
+ value: false)