[tracker: 1/2] Meson build option: Added introspection The --disable-introspection was lost during the Meson port a
- From: Sam Thursfield <sthursfield src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker: 1/2] Meson build option: Added introspection The --disable-introspection was lost during the Meson port a
- Date: Wed, 5 May 2021 13:49:16 +0000 (UTC)
commit dc85742039f478dde9274983db7fb830cd44d061
Author: nitinosiris <nitinwartkar58 gmail com>
Date: Wed May 5 15:33:37 2021 +0530
Meson build option: Added introspection
The --disable-introspection was lost during the Meson port
and but can be useful to shave off some build time for
Flatpaks written in non-introspected languages.
Fixes: https://gitlab.gnome.org/GNOME/tracker/-/issues/37
meson.build | 6 ++++--
meson_options.txt | 2 ++
src/libtracker-sparql/meson.build | 33 +++++++++++++++++----------------
3 files changed, 23 insertions(+), 18 deletions(-)
---
diff --git a/meson.build b/meson.build
index 43935b803..90dc2cc7e 100644
--- a/meson.build
+++ b/meson.build
@@ -43,7 +43,7 @@ gio_unix = dependency('gio-unix-2.0', version: '>' + glib_required)
glib = dependency('glib-2.0', version: '>' + glib_required)
gmodule = dependency('gmodule-2.0', version: '>' + glib_required)
gobject = dependency('gobject-2.0', version: '>' + glib_required)
-gobject_introspection = dependency('gobject-introspection-1.0')
+gobject_introspection = dependency('gobject-introspection-1.0', required: get_option('introspection'))
icu_i18n = dependency('icu-i18n', version: '> 4.8.1.1', required: false)
icu_uc = dependency('icu-uc', version: '> 4.8.1.1', required: false)
json_glib = dependency('json-glib-1.0', version: '>= 1.4', required: true)
@@ -312,8 +312,10 @@ tracker_ontologies_dir = join_paths(get_option('prefix'), get_option('datadir'),
vapi_dir = join_paths(get_option('prefix'), get_option('datadir'), 'vala', 'vapi')
-typelib_dir = gobject_introspection.get_pkgconfig_variable('typelibdir',
+if gobject_introspection.found()
+ typelib_dir = gobject_introspection.get_pkgconfig_variable('typelibdir',
define_variable: [ 'libdir', libdir ])
+endif
subdir('src')
subdir('docs')
diff --git a/meson_options.txt b/meson_options.txt
index 46e9c130f..a5cccb891 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -28,3 +28,5 @@ option('tests_tap_protocol', type: 'boolean', value: false,
description: 'Whether to enable TAP protocol on tests')
option('soup2', type: 'boolean', value: true,
description: 'Whether to build with libsoup2')
+option('introspection', type: 'feature', value: 'enabled',
+ description: 'Whether to enable introspection')
\ No newline at end of file
diff --git a/src/libtracker-sparql/meson.build b/src/libtracker-sparql/meson.build
index 570f4b83b..8b164dfcf 100644
--- a/src/libtracker-sparql/meson.build
+++ b/src/libtracker-sparql/meson.build
@@ -136,20 +136,21 @@ pkg.generate(libtracker_sparql,
],
)
-tracker_sparql_gir = gnome.generate_gir(libtracker_sparql,
- sources: libtracker_sparql_c_sources + libtracker_sparql_c_public_headers,
- nsversion: tracker_api_version,
- namespace: 'Tracker',
- identifier_prefix: 'Tracker',
- symbol_prefix: 'tracker',
- includes : ['GLib-2.0', 'GObject-2.0', 'Gio-2.0' ],
- link_with: libtracker_sparql,
- install: true,
- extra_args: [
- '--c-include',
- 'libtracker-sparql/tracker-sparql.h',
- '-DTRACKER_COMPILATION',
- ],
- export_packages: 'tracker-sparql-3.0')
-
+if get_option('introspection').enabled()
+ tracker_sparql_gir = gnome.generate_gir(libtracker_sparql,
+ sources: libtracker_sparql_c_sources + libtracker_sparql_c_public_headers,
+ nsversion: tracker_api_version,
+ namespace: 'Tracker',
+ identifier_prefix: 'Tracker',
+ symbol_prefix: 'tracker',
+ includes : ['GLib-2.0', 'GObject-2.0', 'Gio-2.0' ],
+ link_with: libtracker_sparql,
+ install: true,
+ extra_args: [
+ '--c-include',
+ 'libtracker-sparql/tracker-sparql.h',
+ '-DTRACKER_COMPILATION',
+ ],
+ export_packages: 'tracker-sparql-3.0')
+endif
tracker_sparql_uninstalled_dir = meson.current_build_dir()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]