diff options
| author | Dirk-Jan C. Binnema <djcb@djcbsoftware.nl> | 2024-04-30 19:29:16 +0300 |
|---|---|---|
| committer | Dirk-Jan C. Binnema <djcb@djcbsoftware.nl> | 2024-05-01 17:02:24 +0300 |
| commit | 5a4866403321a6a93e5e487ec4e0b9b5ee2abb36 (patch) | |
| tree | a0d1b29c038d70585d88e1a9d01c00129b1a3467 /meson.build | |
| parent | 32bb79b316b1e36e6dabbff569f3507f848ba2f9 (diff) | |
lib: centralize xapian include, enable move semantics
Only include xapian.h in one place, so we can have consistent options.
With that in place, we can enable C++ move semantics.
We don't do anything with that yet, but we check in the meson.build file
to see if we have the required xapian version.
Diffstat (limited to 'meson.build')
| -rw-r--r-- | meson.build | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/meson.build b/meson.build index 84ea073..5d91a8b 100644 --- a/meson.build +++ b/meson.build @@ -191,13 +191,16 @@ gio_unix_dep = dependency('gio-unix-2.0', version: '>= 2.60') gmime_dep = dependency('gmime-3.0', version: '>= 3.2') thread_dep = dependency('threads') -# we need Xapian 1.4; if we have 1.4.23, we have some newer APIs. -xapian_dep = dependency('xapian-core', version:'>= 1.4.23', required:false) -if xapian_dep.found() +# we need Xapian 1.4 +xapian_dep = dependency('xapian-core', version:'>= 1.4', required:true) +xapver = xapian_dep.version() +if xapver.version_compare('>= 1.4.6') + message('xapian ' + xapver + ' supports c++ move-semantics') + config_h_data.set('HAVE_XAPIAN_MOVE_SEMANTICS', 1) +endif +if xapver.version_compare('>= 1.4.23') + message('xapian ' + xapver + ' supports ngrams') config_h_data.set('HAVE_XAPIAN_FLAG_NGRAMS', 1) -else - xapian_dep = dependency('xapian-core', version:'>= 1.4') - message('Found xapian ' + xapian_dep.version()) endif # optionally, use Compact Language Detector2 if we can find it. |
