[tracker-miners/wip/sam/meson-subproject] meson: Allow building Tracker core as a subproject
- From: Sam Thursfield <sthursfield src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker-miners/wip/sam/meson-subproject] meson: Allow building Tracker core as a subproject
- Date: Thu, 19 Oct 2017 19:28:36 +0000 (UTC)
commit 3ae804160358f45cbd40068b1f72a1b1d3bf1383
Author: Sam Thursfield <sam thursfield codethink co uk>
Date: Thu Oct 19 20:25:26 2017 +0100
meson: Allow building Tracker core as a subproject
Both repos contain a libtracker-common target and we need to disable
one of them. We use the one from tracker.git, but to work this requires
a change in tracker.git that adds tracker-seccomp.c from this repo to
the build.
meson.build | 15 +++++++++++++--
src/meson.build | 6 +++++-
2 files changed, 18 insertions(+), 3 deletions(-)
---
diff --git a/meson.build b/meson.build
index 46ea2d9..412f84b 100644
--- a/meson.build
+++ b/meson.build
@@ -9,8 +9,19 @@ tracker_api_version = '2.0'
glib_required = '2.40.0'
-tracker_sparql = dependency('tracker-sparql-2.0', version: '>= 1.99.0', required: true)
-tracker_miner = dependency('tracker-miner-2.0', version: '>= 1.99.0', required: true)
+tracker_sparql = dependency('tracker-sparql-2.0', version: '>= 1.99.0', required: false)
+tracker_miner = dependency('tracker-miner-2.0', version: '>= 1.99.0', required: false)
+
+if not tracker_sparql.found() or not tracker_miner.found()
+ message('Tracker libraries were not found or are too old. A local copy will be built if possible.')
+ tracker_subproject = subproject('tracker')
+
+ tracker_sparql = tracker_subproject.get_variable('tracker_sparql_dep')
+ tracker_miner = tracker_subproject.get_variable('tracker_miner_dep')
+else
+ tracker_subproject = false
+endif
+
avcodec = dependency('libavcodec', version: '>= 0.8.4', required: false)
avformat = dependency('libavformat', version: '>= 0.8.4', required: false)
avutil = dependency('libavutil', version: '>= 0.8.4', required: false)
diff --git a/src/meson.build b/src/meson.build
index e711db8..81c92b7 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -1,5 +1,9 @@
# Shared common code
-subdir('libtracker-common')
+if tracker_subproject == false
+ subdir('libtracker-common')
+else
+ tracker_common_dep = tracker_subproject.get_variable('tracker_common_dep')
+endif
# Internal data extraction helpers
subdir('libtracker-extract')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]