From 899e2a934553b5d97f04d2268421eae3cf8a0197 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?I=C3=B1igo=20Mart=C3=ADnez?= Date: Fri, 11 Aug 2017 11:45:48 +0200 Subject: 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 --- common/Makefile.am | 5 ++- common/meson.build | 99 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 103 insertions(+), 1 deletion(-) create mode 100644 common/meson.build (limited to 'common') diff --git a/common/Makefile.am b/common/Makefile.am index 9fff709b..67ba37fa 100644 --- a/common/Makefile.am +++ b/common/Makefile.am @@ -87,6 +87,9 @@ libgvfscommon_gphoto2_la_LIBADD = \ endif -EXTRA_DIST = org.gtk.vfs.xml +EXTRA_DIST = \ + org.gtk.vfs.xml \ + meson.build \ + $(NULL) CLEANFILES = $(dbus_built_sources) diff --git a/common/meson.build b/common/meson.build new file mode 100644 index 00000000..5318d7a6 --- /dev/null +++ b/common/meson.build @@ -0,0 +1,99 @@ +common_inc = include_directories('.') + +common_cflags = ['-DG_LOG_DOMAIN="@0@"'.format(gvfs_name.to_upper())] + +sources = files( + 'gmountoperationdbus.c', + 'gmountsource.c', + 'gmountspec.c', + 'gmounttracker.c', + 'gvfsdaemonprotocol.c', + 'gvfsfileinfo.c', + 'gvfsicon.c', + 'gvfsmonitorimpl.c', + 'gvfsutils.c' +) + +sources += gnome.gdbus_codegen( + 'gvfsdbus', + gvfs_namespace + '.xml', + interface_prefix: gvfs_namespace + '.', + namespace: 'GVfsDBus' +) + +cflags = common_cflags + ['-DREMOTE_VOLUME_MONITORS_DIR="@0@"'.format(gvfs_remote_volume_monitors_dir)] + +libgvfscommon = shared_library( + 'gvfscommon', + sources: sources, + include_directories: top_inc, + dependencies: glib_deps, + c_args: cflags, + install: true, + install_dir: gvfs_pkglibdir +) + +libgvfscommon_dep = declare_dependency( + link_with: libgvfscommon, + include_directories: common_inc +) + +deps = glib_deps + +if enable_bluray + deps += libbluray_dep +endif + +libgvfscommon_monitor = static_library( + 'gvfscommon-monitor', + sources: 'gvfsmountinfo.c', + include_directories: top_inc, + dependencies: deps, + c_args: common_cflags, + link_with: libgvfscommon +) + +libgvfscommon_monitor_dep = declare_dependency( + link_with: libgvfscommon_monitor, + include_directories: common_inc +) + +if enable_avahi + sources = files( + 'gvfsdnssdresolver.c', + 'gvfsdnssdutils.c' + ) + + deps = glib_deps + [ + avahi_client_dep, + avahi_glib_dep + ] + + libgvfscommon_dnssd = static_library( + 'gvfscommon-dnssd', + sources: sources, + include_directories: top_inc, + dependencies: deps, + c_args: common_cflags, + link_with: libgvfscommon + ) + + libgvfscommon_dnssd_dep = declare_dependency( + link_with: libgvfscommon_dnssd, + include_directories: common_inc + ) +endif + +if enable_libmtp or enable_gphoto2 + libgvfscommon_gphoto2 = static_library( + 'gvfscommon-gphoto2', + sources: 'gvfsgphoto2utils.c', + include_directories: top_inc, + dependencies: gudev_dep + ) + + libgvfscommon_gphoto2_dep = declare_dependency( + link_with: libgvfscommon_gphoto2, + include_directories: common_inc + ) +endif -- cgit v1.2.1