summaryrefslogtreecommitdiff
path: root/metadata
diff options
context:
space:
mode:
authorIñigo Martínez <inigomartinez@gmail.com>2017-08-11 11:45:48 +0200
committerOndrej Holy <oholy@redhat.com>2017-10-31 18:20:11 +0100
commit899e2a934553b5d97f04d2268421eae3cf8a0197 (patch)
tree57fbcdaf28c79ebeb203232b28783f6786845654 /metadata
parent5db165178a2528802edbe2eaf34ea2a63a78cc02 (diff)
downloadgvfs-899e2a934553b5d97f04d2268421eae3cf8a0197.tar.gz
build: Port to meson build system
meson is a build system focused on speed an ease of use, which helps speeding up the software development. This patch adds meson support along autotools. https://bugzilla.gnome.org/show_bug.cgi?id=786149
Diffstat (limited to 'metadata')
-rw-r--r--metadata/Makefile.am1
-rw-r--r--metadata/meson.build106
2 files changed, 107 insertions, 0 deletions
diff --git a/metadata/Makefile.am b/metadata/Makefile.am
index b38d01b6..9acc2135 100644
--- a/metadata/Makefile.am
+++ b/metadata/Makefile.am
@@ -81,6 +81,7 @@ EXTRA_DIST = \
$(service_in_files) \
$(systemd_user_in_files) \
dbus-interface.xml \
+ meson.build \
$(NULL)
CLEANFILES = \
diff --git a/metadata/meson.build b/metadata/meson.build
new file mode 100644
index 00000000..303280f0
--- /dev/null
+++ b/metadata/meson.build
@@ -0,0 +1,106 @@
+service = gvfs_namespace + '.Metadata.service'
+
+metadata_service = configure_file(
+ input: service + '.in',
+ output: service,
+ install: true,
+ install_dir: gvfs_dbus_service_dir,
+ configuration: service_conf
+)
+
+if have_systemd_user_unit
+ service = 'gvfs-metadata.service'
+
+ configure_file(
+ input: service + '.in',
+ output: service,
+ install: true,
+ install_dir: systemd_user_dir,
+ configuration: service_conf
+ )
+endif
+
+metadata_dbus = gnome.gdbus_codegen(
+ 'metadata-dbus',
+ 'dbus-interface.xml',
+ interface_prefix: gvfs_namespace + '.',
+ namespace: 'GVfs'
+)
+
+sources = files(
+ 'crc32.c',
+ 'metabuilder.c',
+ 'metatree.c'
+)
+
+cflags = [
+ '-DDBUS_API_SUBJECT_TO_CHANGE',
+ '-DG_LOG_DOMAIN="@0@"'.format(gvfs_name.to_upper()),
+ '-DGVFS_LOCALEDIR="@0@"'.format(gvfs_localedir)
+]
+
+libmetadata = static_library(
+ 'metadata',
+ sources: sources + [metadata_dbus],
+ include_directories: [top_inc, common_inc],
+ dependencies: glib_deps,
+ c_args: cflags,
+ pic: true
+)
+
+libmetadata_dep = declare_dependency(
+ sources: metadata_dbus,
+ link_with: libmetadata,
+ include_directories: include_directories('.'),
+ dependencies: glib_deps
+)
+
+executable(
+ 'gvfsd-metadata',
+ 'meta-daemon.c',
+ include_directories: top_inc,
+ dependencies: [
+ libgvfscommon_dep,
+ libmetadata_dep,
+ libudev_dep
+ ],
+ c_args: cflags,
+ install: true,
+ install_rpath: gvfs_rpath,
+ install_dir: gvfs_libexecdir
+)
+
+if enable_devel_utils
+ apps = [
+ 'meta-ls',
+ 'meta-get',
+ 'meta-set',
+ 'meta-get-tree'
+ ]
+
+ foreach app: apps
+ executable(
+ app,
+ app + '.c',
+ include_directories: top_inc,
+ dependencies: [
+ libgvfscommon_dep,
+ libmetadata_dep
+ ],
+ c_args: cflags
+ )
+ endforeach
+
+ if have_libxml
+ executable(
+ 'convert-nautilus-metadata',
+ 'metadata-nautilus.c',
+ include_directories: top_inc,
+ dependencies: [
+ libmetadata_dep,
+ libxml_dep
+ ],
+ c_args: cflags
+ )
+ endif
+endif