[tracker-miners] meson: Allow disabling individual miners
- From: Sam Thursfield <sthursfield src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker-miners] meson: Allow disabling individual miners
- Date: Thu, 2 Nov 2017 11:31:13 +0000 (UTC)
commit 97cc201366b2b75462c60a8fdc677700e7f2f567
Author: Sam Thursfield <sam thursfield codethink co uk>
Date: Tue Oct 31 18:00:39 2017 +0000
meson: Allow disabling individual miners
Also cleans up a little nonsense in the meson rules.
meson.build | 16 +++++-----------
meson_options.txt | 6 ++++++
src/miners/meson.build | 14 +++++++++++---
tests/meson.build | 2 +-
4 files changed, 23 insertions(+), 15 deletions(-)
---
diff --git a/meson.build b/meson.build
index 00f9161..9b4989b 100644
--- a/meson.build
+++ b/meson.build
@@ -65,9 +65,6 @@ uuid = cc.find_library('uuid')
add_project_arguments('-Wno-pointer-sign', language: 'c')
add_project_arguments('-DTRACKER_COMPILATION', language: 'c')
-enable_extract = get_option('extract')
-enable_writeback = get_option('writeback')
-
##################################################################
# Check for libtracker-common, make sure libstemmer exists
##################################################################
@@ -263,9 +260,6 @@ conf = configuration_data()
conf.set('DISABLE_JOURNAL', get_option('journal') == false)
conf.set('USING_UNZIPPSFILES', get_option('unzip_ps_gz_files') == true)
-conf.set('HAVE_TRACKER_EXTRACT', enable_extract)
-conf.set('HAVE_TRACKER_WRITEBACK', enable_writeback)
-
conf.set('HAVE_ENCA', charset_library_name == 'enca')
conf.set('HAVE_EXEMPI', exempi.found())
conf.set('HAVE_GSTREAMER', generic_media_handler_name == 'gstreamer')
@@ -323,11 +317,11 @@ tracker_c_args = [
'-D_LARGEFILE64_SOURCE',
]
-have_tracker_miner_fs = true
-have_tracker_miner_apps = true
-have_tracker_miner_rss = true
-have_tracker_extract = true
-have_tracker_writeback = true
+have_tracker_extract = get_option('extract')
+have_tracker_miner_apps = get_option('miner_apps')
+have_tracker_miner_fs = get_option('miner_fs')
+have_tracker_miner_rss = get_option('miner_rss')
+have_tracker_writeback = get_option('writeback')
configinc = include_directories('./')
srcinc = include_directories('src/')
diff --git a/meson_options.txt b/meson_options.txt
index 81e68c4..38e8b2d 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -8,6 +8,12 @@ option('guarantee_metadata', type: 'boolean', value: true,
description: 'Set nie:title and nie:contentCreated from filename and mtime if no metadata available')
option('journal', type: 'boolean', value: true,
description: 'Enable database journal backup mechanism')
+option('miner_apps', type: 'boolean', value: true,
+ description: 'Enable the Tracker applications miner')
+option('miner_fs', type: 'boolean', value: true,
+ description: 'Enable the Tracker filesystem miner')
+option('miner_rss', type: 'boolean', value: true,
+ description: 'Enable the Tracker RSS miner')
option('writeback', type: 'boolean', value: true,
description: 'Enable Tracker writeback feature')
diff --git a/src/miners/meson.build b/src/miners/meson.build
index d938410..fda2147 100644
--- a/src/miners/meson.build
+++ b/src/miners/meson.build
@@ -1,3 +1,11 @@
-subdir('fs')
-subdir('rss')
-subdir('apps')
+if have_tracker_miner_fs
+ subdir('fs')
+endif
+
+if have_tracker_miner_rss
+ subdir('rss')
+endif
+
+if have_tracker_miner_apps
+ subdir('apps')
+endif
diff --git a/tests/meson.build b/tests/meson.build
index 632a9ca..6687202 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -2,7 +2,7 @@ subdir('common')
subdir('libtracker-common')
-if enable_extract
+if have_tracker_extract
subdir('libtracker-extract')
endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]