summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitlab-ci.yml6
-rw-r--r--meson.build13
-rw-r--r--meson_options.txt6
3 files changed, 8 insertions, 17 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index e54151bb..bb9a1572 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -102,7 +102,7 @@ static-scan:
- '.fdo.distribution-image@opensuse'
needs: ['opensuse-container@x86_64']
variables:
- MESON_EXTRA_FLAGS: "--buildtype=debug -Dintrospection=no -Ddocs=false"
+ MESON_EXTRA_FLAGS: "--buildtype=debug -Dintrospection=disabled -Ddocs=false"
script:
- meson setup ${MESON_EXTRA_FLAGS} --prefix /usr _scan_build .
- ninja -C _scan_build scan-build
@@ -120,7 +120,7 @@ asan-build:
- '.fdo.distribution-image@opensuse'
needs: ['opensuse-container@x86_64']
variables:
- MESON_EXTRA_FLAGS: "--buildtype=debug -Db_sanitize=address -Db_lundef=false -Dintrospection=no -Ddocs=false"
+ MESON_EXTRA_FLAGS: "--buildtype=debug -Db_sanitize=address -Db_lundef=false -Dintrospection=disabled -Ddocs=false"
# Add a suppressions file for address-sanitizer. Looks like libdbus has a minor leak that is hurting
# the tests while run with asan. Hopefully this will go away once we convert everything to gdbus.
#
@@ -148,7 +148,7 @@ coverage:
- '.fdo.distribution-image@opensuse'
needs: ['opensuse-container@x86_64']
variables:
- MESON_EXTRA_FLAGS: "--buildtype=debug -Ddocs=false -Dintrospection=no"
+ MESON_EXTRA_FLAGS: "--buildtype=debug -Ddocs=false -Dintrospection=disabled"
CFLAGS: "-coverage -ftest-coverage -fprofile-arcs"
script:
- source ./ci/env.sh
diff --git a/meson.build b/meson.build
index 3131538c..44f109f6 100644
--- a/meson.build
+++ b/meson.build
@@ -123,7 +123,6 @@ glib_req_version = '>= 2.67.4'
gobject_req_version = '>= 2.0.0'
gmodule_req_version = '>= 2.0.0'
gio_req_version = '>= 2.28.0'
-gir_req_version = '>= 0.6.7'
libxml_req_version = '>= 2.9.1'
libdbus_dep = dependency('dbus-1', version: libdbus_req_version)
@@ -174,16 +173,8 @@ at_spi_conf.set('ALIGNOF_DBIND_POINTER', cc.alignment('dbind_pointer', prefix: '
at_spi_conf.set('ALIGNOF_DBIND_STRUCT', cc.alignment('dbind_struct', prefix: 'typedef struct { char s1; } dbind_struct;'))
# introspection support
-have_gir = false
-
-introspection_option = get_option('introspection')
-if introspection_option != 'no'
- gir_dep = dependency('gobject-introspection-1.0', version: gir_req_version, required: false)
-
- if gir_dep.found()
- have_gir = true
- endif
-endif
+gir = find_program('g-ir-scanner', required : get_option('introspection'))
+have_gir = gir.found() and (not meson.is_cross_build() or get_option('introspection').enabled())
xgettext = find_program('xgettext', required : false)
diff --git a/meson_options.txt b/meson_options.txt
index b4374515..11cde7bc 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -25,9 +25,9 @@ option('docs',
value: false)
option('introspection',
description: 'Enable GObject Introspection (depends on GObject)',
- type: 'combo',
- choices: ['yes', 'no', 'auto'],
- value: 'auto')
+ type: 'feature',
+ value: 'auto',
+ yield: true)
option('x11',
description: 'Enable X11 support',
type: 'feature',