summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Thursfield <sam@afuera.me.uk>2017-12-16 15:02:10 +0000
committerSam Thursfield <sam@afuera.me.uk>2017-12-16 15:02:10 +0000
commitfe77c4dbf6d7e3abe145a979f697b227a83cdb6e (patch)
tree48d8dd33235537fd8269cf9a3b4c414397d1b7ff
parent515451eea93e1a4f022dda22fceaee7fb9611728 (diff)
downloadtracker-fe77c4dbf6d7e3abe145a979f697b227a83cdb6e.tar.gz
meson: Fix build with libstemmer
Based on a patch by Jeremy Bicha <jbicha@ubuntu.com>. https://bugzilla.gnome.org/show_bug.cgi?id=790373
-rw-r--r--meson.build4
-rw-r--r--meson_options.txt2
-rw-r--r--src/libtracker-common/meson.build4
3 files changed, 7 insertions, 3 deletions
diff --git a/meson.build b/meson.build
index 36e008447..8a159af50 100644
--- a/meson.build
+++ b/meson.build
@@ -54,8 +54,8 @@ enable_fts = get_option('fts')
have_libstemmer = false
if get_option('stemmer') != 'no'
- stemmer = cc.find_library('stemmer')
- if stemmer.found()
+ libstemmer = cc.find_library('stemmer', required: false)
+ if libstemmer.found()
have_libstemmer = true
elif get_option('stemmer') == 'yes'
error('stemmer support explicitly requested, but stemmer library couldn\'t be found')
diff --git a/meson_options.txt b/meson_options.txt
index 496d35613..05c65c948 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -7,7 +7,7 @@ option('functional_tests', type: 'boolean', value: true,
option('journal', type: 'boolean', value: true,
description: 'Enable database journal backup mechanism')
-option('stemmer', type: 'combo', choices: ['auto', 'no', 'yes'], value: 'no',
+option('stemmer', type: 'combo', choices: ['auto', 'no', 'yes'], value: 'auto',
description: 'Enable stemming words while indexing')
option('unicode_support', type: 'combo', choices: ['icu', 'unistring', 'auto'], value: 'auto',
description: 'Unicode support library to use')
diff --git a/src/libtracker-common/meson.build b/src/libtracker-common/meson.build
index d56d909a7..4e82e6c7e 100644
--- a/src/libtracker-common/meson.build
+++ b/src/libtracker-common/meson.build
@@ -38,6 +38,10 @@ endif
# FIXME: need to link against -lkvm on OpenBSD, see configure.ac
tracker_common_dependencies = [glib, gio, gio_unix, libmath]
+if have_libstemmer
+ tracker_common_dependencies += [libstemmer]
+endif
+
libtracker_common = library('tracker-common',
tracker_common_sources,
dependencies: tracker_common_dependencies + [unicode_library],