summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2017-07-14 11:24:30 +0200
committerBastien Nocera <hadess@hadess.net>2017-07-18 03:25:03 +0200
commit4ac20d7b6a032a654128e7e51bb141bd04d46c24 (patch)
tree743394a64b1fa1459b3fde7bff1180fcaa47b6d8
parent365ec7f7ac1cec51dc0248dd05b17cb78252a788 (diff)
downloadnautilus-4ac20d7b6a032a654128e7e51bb141bd04d46c24.tar.gz
build: Fix tracker detection
Make sure that tracker-sparql is optional and auto-detected by default and that tracker-sparql-1.0 is still supported. https://bugzilla.gnome.org/show_bug.cgi?id=784940
-rw-r--r--meson.build10
-rw-r--r--meson_options.txt5
-rw-r--r--src/meson.build4
3 files changed, 12 insertions, 7 deletions
diff --git a/meson.build b/meson.build
index 85c3cb9da..4160c8fe0 100644
--- a/meson.build
+++ b/meson.build
@@ -81,9 +81,13 @@ if get_option ('enable-selinux')
conf.set10 ('HAVE_SELINUX', true)
endif
-if get_option ('enable-tracker')
- tracker_sparql = dependency ('tracker-sparql-2.0')
- conf.set10 ('ENABLE_TRACKER', true)
+tracker_option = get_option ('enable-tracker')
+if tracker_option != 'no'
+ tracker_sparql = dependency ('tracker-sparql-2.0', required: (tracker_option == 'yes'))
+ if not tracker_sparql.found()
+ tracker_sparql = dependency ('tracker-sparql-1.0', required: (tracker_option == 'yes'))
+ endif
+ conf.set10 ('ENABLE_TRACKER', tracker_sparql.found())
endif
if get_option ('enable-xmp')
diff --git a/meson_options.txt b/meson_options.txt
index ac4b74a92..4e2880ab1 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -22,8 +22,9 @@ option ('enable-packagekit',
type: 'boolean',
value: true)
option ('enable-tracker',
- type: 'boolean',
- value: true)
+ type: 'combo',
+ choices: ['yes', 'no', 'auto'],
+ value: 'auto')
option ('enable-gtk-doc',
type: 'boolean',
value: false)
diff --git a/src/meson.build b/src/meson.build
index 83723b94f..dd49350c1 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -258,7 +258,7 @@ libnautilus_sources = [
'nautilus-file-undo-manager.h'
]
-if get_option ('enable-tracker')
+if tracker_sparql.found()
libnautilus_sources += ['nautilus-batch-rename-dialog.c',
'nautilus-batch-rename-dialog.h',
'nautilus-batch-rename-utilities.c',
@@ -284,7 +284,7 @@ if get_option ('enable-exif')
nautilus_deps += exif
endif
-if get_option ('enable-tracker')
+if tracker_sparql.found()
nautilus_deps += tracker_sparql
endif