[tracker/wip/sam/meson] More Meson work
- From: Sam Thursfield <sthursfield src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/wip/sam/meson] More Meson work
- Date: Sun, 25 Sep 2016 13:23:27 +0000 (UTC)
commit 74d1e5b690d78fa5334c6414edc0f9dd27f59809
Author: Sam Thursfield <sam afuera me uk>
Date: Sun Sep 25 14:13:28 2016 +0100
More Meson work
docs/tools/meson.build | 6 ++-
examples/libtracker-miner/meson.build | 8 +++
examples/libtracker-sparql/meson.build | 7 +++
examples/meson.build | 2 +
meson.build | 31 ++++++++++--
src/libtracker-miner/meson.build | 84 ++++++++++++++++++++++++++++++++
src/meson.build | 1 +
7 files changed, 133 insertions(+), 6 deletions(-)
---
diff --git a/docs/tools/meson.build b/docs/tools/meson.build
index e709833..db0758f 100644
--- a/docs/tools/meson.build
+++ b/docs/tools/meson.build
@@ -13,8 +13,10 @@ ttl_loader_files = [
ttl2sgml = executable('ttl2sgml',
ttl_loader_files, 'ttl2sgml.c',
- dependencies: [tracker_data_dep, tracker_sparql_dep])
+ dependencies: [tracker_data_dep, tracker_sparql_dep],
+ c_args: ['-DTRACKER_COMPILATION'])
ttlresource2sgml = executable('ttlresource2sgml',
ttl_loader_files, 'ttlresource2sgml.c',
- dependencies: [tracker_data_dep, tracker_sparql_dep])
+ dependencies: [tracker_data_dep, tracker_sparql_dep],
+ c_args: ['-DTRACKER_COMPILATION'])
diff --git a/examples/libtracker-miner/meson.build b/examples/libtracker-miner/meson.build
new file mode 100644
index 0000000..f51d4a0
--- /dev/null
+++ b/examples/libtracker-miner/meson.build
@@ -0,0 +1,8 @@
+sources = [
+ 'tracker-miner-test.c',
+ 'tracker-miner-test.h',
+ 'tracker-main.c']
+
+executable('tracker-miner-test', sources,
+ dependencies: [tracker_miner_dep]
+)
diff --git a/examples/libtracker-sparql/meson.build b/examples/libtracker-sparql/meson.build
new file mode 100644
index 0000000..17226b9
--- /dev/null
+++ b/examples/libtracker-sparql/meson.build
@@ -0,0 +1,7 @@
+executable('async-connection', 'async-connection.c',
+ dependencies: tracker_sparql_dep
+)
+
+executable('class-signal', 'class-signal.c',
+ dependencies: tracker_sparql_dep
+)
diff --git a/examples/meson.build b/examples/meson.build
new file mode 100644
index 0000000..6ab29f9
--- /dev/null
+++ b/examples/meson.build
@@ -0,0 +1,2 @@
+subdir('libtracker-miner')
+subdir('libtracker-sparql')
diff --git a/meson.build b/meson.build
index 17b6298..777f7aa 100644
--- a/meson.build
+++ b/meson.build
@@ -1,5 +1,14 @@
# Experimental, incomplete build instructions for Tracker using
# Meson: http://www.mesonbuild.com/
+#
+# Open questions:
+# - should .h files be listed as sources? I think
+# there's no need.
+# - is the installed version identical to an installed
+# autotools build?
+# - how do we replace 'make dist' etc. ? I guess `git archive` --
+# there's no need to pregenerate files if Autotools isn't used :=)
+# - does crossbuilding (e.g. in Buildroot) work correctly?
project('tracker', 'c', 'vala', version: '1.8.0')
@@ -68,6 +77,8 @@ libmath = meson.get_compiler('c').find_library('m')
# to the Vala commandline, but still works as expected for C code.
uuid = meson.get_compiler('c').find_library('uuid')
+glib_mkenums = find_program('glib-mkenums')
+
# FIXME: allow the user to opt in to libunistring with a commandline arg
# (if that feature is still useful).
use_libicu = true
@@ -135,6 +146,10 @@ else
libtracker_common_parser = files('src/libtracker-common/tracker-parser-libunistring.c')
endif
+# FIXME: need to link against -lkvm on OpenBSD, see configure.ac
+libtracker_common_dependencies = [
+ gio_unix, glib, libmath]
+
libtracker_common = library(
'tracker-' + tracker_api_version + '/libtracker-common',
'src/libtracker-common/tracker-date-time.c',
@@ -149,14 +164,18 @@ libtracker_common = library(
'src/libtracker-common/tracker-parser-utils.c',
'src/libtracker-common/tracker-language.c',
libtracker_common_parser,
- # FIXME: need to link against -lkvm on OpenBSD, see configure.ac
- dependencies: [gio_unix, glib, libmath, unicode_library],
+ dependencies: libtracker_common_dependencies + [unicode_library],
c_args: [
'-DSHAREDIR="' + get_option('datadir') + '"',
'-DTRACKER_COMPILATION',
'-I' + meson.source_root() + '/src',
],
)
+tracker_common_dep = declare_dependency(
+ link_with: libtracker_common,
+ dependencies: libtracker_common_dependencies,
+ include_directories: include_directories(meson.source_root() + '/src'),
+)
if sqlite3_has_builtin_fts5
libtracker_fts_fts5 = []
@@ -206,7 +225,8 @@ libtracker_sparql_intermediate_vala = static_library(
],
)
tracker_sparql_intermediate_vala_dep = declare_dependency(
- link_with: [libtracker_sparql_intermediate_vala, libtracker_common]
+ link_with: [libtracker_sparql_intermediate_vala, libtracker_common],
+ include_directories: include_directories('.')
)
tracker_sparql_intermediate_dependencies = [gio, glib, gobject, uuid, tracker_sparql_intermediate_vala_dep]
@@ -351,7 +371,7 @@ libtracker_sparql = library(
)
tracker_sparql_dep = declare_dependency(
link_with: [libtracker_sparql, libtracker_common, libtracker_bus],
- dependencies: [tracker_direct_dep],
+ dependencies: [tracker_common_dep, tracker_direct_dep],
)
executable(
@@ -375,6 +395,9 @@ executable(
]
)
+subdir('src')
+
subdir('docs')
+subdir('examples')
subdir('po')
diff --git a/src/libtracker-miner/meson.build b/src/libtracker-miner/meson.build
new file mode 100644
index 0000000..bf62306
--- /dev/null
+++ b/src/libtracker-miner/meson.build
@@ -0,0 +1,84 @@
+shared_libtracker_miner_monitor_sources = files('tracker-monitor.c')
+shared_libtracker_miner_file_system_sources = files('tracker-file-system.c')
+shared_libtracker_miner_crawler_sources = files('tracker-crawler.c')
+
+tracker_miner_enum_types_header = custom_target('tracker-miner-enum-types-header',
+ input: ['tracker-miner-enum-types.h.template', 'tracker-miner-enums.h'],
+ output: 'tracker-miner-enum-types.h',
+ command: [glib_mkenums, '--template', '@INPUT0@', '@INPUT1@'],
+ capture: true
+)
+
+tracker_miner_enum_types_code = custom_target('tracker-miner-enum-types-code',
+ input: ['tracker-miner-enum-types.c.template', 'tracker-miner-enums.h'],
+ output: 'tracker-miner-enum-types.c',
+ command: [glib_mkenums, '--template', '@INPUT0@', '@INPUT1@'],
+ capture: true
+)
+
+private_sources = [
+ 'tracker-crawler.c',
+ 'tracker-file-data-provider.c',
+ 'tracker-file-enumerator.c',
+ 'tracker-file-notifier.c',
+ 'tracker-file-system.c',
+ 'tracker-priority-queue.c',
+ 'tracker-task-pool.c',
+ 'tracker-sparql-buffer.c',
+ 'tracker-thumbnailer.c',
+ 'tracker-utils.c']
+
+if libmediaart.found()
+ private_sources.append(['tracker-media-art.c'])
+endif
+
+miner_sources = [
+ shared_libtracker_miner_monitor_sources,
+ shared_libtracker_miner_file_system_sources,
+ shared_libtracker_miner_crawler_sources,
+ 'tracker-data-provider.c',
+ 'tracker-data-provider.h',
+ 'tracker-decorator.c',
+ 'tracker-decorator.h',
+ 'tracker-decorator-fs.c',
+ 'tracker-decorator-fs.h',
+ 'tracker-enumerator.c',
+ 'tracker-enumerator.h',
+ 'tracker-indexing-tree.c',
+ 'tracker-indexing-tree.h',
+ 'tracker-miner-enum-types.c',
+ 'tracker-miner-enum-types.h',
+ 'tracker-miner-object.c',
+ 'tracker-miner-object.h',
+ 'tracker-miner-online.c',
+ 'tracker-miner-online.h',
+ 'tracker-miner-fs.c',
+ 'tracker-miner-fs.h']
+
+libtracker_miner_private = static_library(
+ 'tracker-miner-private',
+ private_sources,
+ dependencies: [tracker_common_dep, tracker_sparql_dep],
+ c_args: [
+ '-DSHAREDIR="@0@"'.format(get_option('datadir')),
+ '-DTRACKER_COMPILATION',
+ '-DTRACKER_MINERS_DIR="@0@/tracker/miners"'.format(get_option('datadir')),
+ ],
+)
+
+libtracker_miner = library(
+ 'tracker-miner-' + tracker_api_version,
+ miner_sources,
+ link_with: [libtracker_miner_private],
+ dependencies: [tracker_common_dep, tracker_sparql_dep],
+ c_args: [
+ '-DSHAREDIR="@0@"'.format(get_option('datadir')),
+ '-DTRACKER_COMPILATION',
+ '-DTRACKER_MINERS_DIR="@0@/tracker/miners"'.format(get_option('datadir')),
+ ],
+)
+
+tracker_miner_dep = declare_dependency(
+ link_with: libtracker_miner,
+ dependencies: [tracker_common_dep, tracker_sparql_dep]
+)
diff --git a/src/meson.build b/src/meson.build
new file mode 100644
index 0000000..bf8b166
--- /dev/null
+++ b/src/meson.build
@@ -0,0 +1 @@
+subdir('libtracker-miner')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]