[rhythmbox/wip/sam/meson: 1/3] build: Add meson build system




commit 2d2b556bbf2a659b2723e6a4a75d6b1b050df1d8
Author: Sam Thursfield <sam afuera me uk>
Date:   Tue Sep 13 00:24:11 2016 +0100

    build: Add meson build system
    
    See <http://www.mesonbuild.com/> for more information about Meson.
    
    Co-Authored-By: Bastien Nocera <hadess hadess net>

 .gitignore                                         |   1 +
 backends/gstreamer/meson.build                     |  32 ++
 backends/meson.build                               |  39 +++
 bindings/gi/meson.build                            |   2 +
 bindings/meson.build                               |   5 +
 bindings/vala/meson.build                          |   5 +
 config.h.meson                                     | 132 ++++++++
 data/icons/meson.build                             |   7 +
 data/meson.build                                   |  78 +++++
 doc/reference/meson.build                          | 117 +++++++
 help/LINGUAS                                       |  20 ++
 help/meson.build                                   |  22 ++
 lib/libmediaplayerid/meson.build                   |  50 +++
 lib/meson.build                                    |  61 ++++
 meson.build                                        | 376 +++++++++++++++++++++
 meson_options.txt                                  |  37 ++
 metadata/meson.build                               |  70 ++++
 plugins/android/meson.build                        |  25 ++
 plugins/artsearch/meson.build                      |  20 ++
 plugins/audiocd/meson.build                        |  32 ++
 plugins/audioscrobbler/meson.build                 |  50 +++
 plugins/brasero-disc-recorder/meson.build          |  20 ++
 plugins/context/meson.build                        |  39 +++
 plugins/daap/meson.build                           |  42 +++
 plugins/dbus-media-server/meson.build              |  20 ++
 plugins/fmradio/meson.build                        |  28 ++
 plugins/generic-player/meson.build                 |  28 ++
 plugins/grilo/meson.build                          |  23 ++
 plugins/im-status/meson.build                      |  14 +
 plugins/ipod/meson.build                           |  31 ++
 plugins/iradio/meson.build                         |  30 ++
 plugins/lirc/meson.build                           |  23 ++
 plugins/listenbrainz/meson.build                   |  22 ++
 plugins/lyrics/meson.build                         |  28 ++
 .../icons/hicolor/scalable/places/meson.build      |   3 +
 plugins/magnatune/meson.build                      |  30 ++
 plugins/meson.build                                |  65 ++++
 plugins/mmkeys/meson.build                         |  19 ++
 plugins/mpris/meson.build                          |  27 ++
 plugins/mtpdevice/meson.build                      |  36 ++
 plugins/notification/meson.build                   |  19 ++
 plugins/power-manager/meson.build                  |  20 ++
 plugins/pythonconsole/meson.build                  |  14 +
 plugins/rb/meson.build                             |  18 +
 plugins/rbzeitgeist/meson.build                    |  14 +
 plugins/replaygain/meson.build                     |  20 ++
 plugins/soundcloud/meson.build                     |  21 ++
 plugins/webremote/meson.build                      |  31 ++
 po/meson.build                                     |   2 +
 podcast/meson.build                                |  66 ++++
 remote/dbus/meson.build                            |  16 +
 remote/meson.build                                 |   1 +
 rhythmdb/meson.build                               |  59 ++++
 sample-plugins/meson.build                         |  12 +
 sample-plugins/sample-python/meson.build           |  16 +
 sample-plugins/sample-vala/meson.build             |  29 ++
 sample-plugins/sample/meson.build                  |  19 ++
 shell/meson.build                                  | 152 +++++++++
 sources/meson.build                                |  75 ++++
 sources/sync/meson.build                           |  34 ++
 tests/meson.build                                  |  46 +++
 widgets/meson.build                                |  81 +++++
 62 files changed, 2474 insertions(+)
---
diff --git a/.gitignore b/.gitignore
index eaae08289..7a115bb99 100644
--- a/.gitignore
+++ b/.gitignore
@@ -23,6 +23,7 @@ compile
 confdefs.h
 configure
 config.*
+!config.h.meson
 aclocal.m4
 Makefile
 Makefile.in
diff --git a/backends/gstreamer/meson.build b/backends/gstreamer/meson.build
new file mode 100644
index 000000000..ea95dec8c
--- /dev/null
+++ b/backends/gstreamer/meson.build
@@ -0,0 +1,32 @@
+gstreamer_backend_headers = files(
+  'rb-player-gst-helper.h'
+)
+
+gstreamer_backend_sources = files(
+  'rb-encoder-gst.c',
+  'rb-player-gst-helper.c',
+  'rb-player-gst.c',
+  'rb-player-gst-xfade.c',
+)
+
+gstreamer_backend_c_args = [
+  '-DGNOMELOCALEDIR="' + datadir + '/locale"',
+  '-DG_LOG_DOMAIN="Rhythmbox"',
+]
+
+gstreamer_backend_dependencies = [gstreamer_base, gstreamer_controller,
+  gstreamer_plugins_base, gstreamer_tag]
+
+rbbackendsgstreamer_lib = static_library('rbbackendsgstreamer',
+  gstreamer_backend_sources,
+  dependencies: [gstreamer_backend_dependencies, rhythmdb_dep, librb_dep],
+  c_args: gstreamer_backend_c_args,
+  include_directories: backends_inc,
+  link_args: ['-export-dynamic'],
+)
+
+rbbackendsgstreamer_dep = declare_dependency(
+  link_with: rbbackendsgstreamer_lib,
+  dependencies: gstreamer_backend_dependencies,
+  include_directories: include_directories('.')
+)
diff --git a/backends/meson.build b/backends/meson.build
new file mode 100644
index 000000000..a09bd5413
--- /dev/null
+++ b/backends/meson.build
@@ -0,0 +1,39 @@
+backends_inc = include_directories('.')
+
+subdir('gstreamer')
+
+backends_headers = files(
+  'rb-encoder.h',
+  'rb-player.h',
+  'rb-player-gst-filter.h',
+  'rb-player-gst-tee.h'
+)
+
+install_headers(backends_headers, subdir: 'rhythmbox/backends')
+
+backends_sources = files(
+  'rb-encoder.c',
+  'rb-player.c',
+  'rb-player-gst-filter.c',
+  'rb-player-gst-tee.c',
+)
+
+backends_c_args = [
+  '-DGNOMELOCALEDIR="' + datadir + '/locale"',
+  '-DG_LOG_DOMAIN="Rhythmbox"',
+]
+
+backends_dependencies = [gstreamer_backend_dependencies]
+
+rbbackends_lib = static_library('rbbackends',
+  backends_sources,
+  dependencies: [librb_dep, rbbackendsgstreamer_dep],
+  c_args: backends_c_args,
+  link_args: ['-export-dynamic'],
+)
+
+rbbackends_dep = declare_dependency(
+  link_with: rbbackends_lib,
+  dependencies: backends_dependencies,
+  include_directories: include_directories('.'),
+)
diff --git a/bindings/gi/meson.build b/bindings/gi/meson.build
new file mode 100644
index 000000000..82b803169
--- /dev/null
+++ b/bindings/gi/meson.build
@@ -0,0 +1,2 @@
+# We can't build the gir files here without
+# https://github.com/mesonbuild/meson/pull/7913
diff --git a/bindings/meson.build b/bindings/meson.build
new file mode 100644
index 000000000..ef61c7522
--- /dev/null
+++ b/bindings/meson.build
@@ -0,0 +1,5 @@
+subdir('gi')
+
+if enable_vala
+  subdir('vala')
+endif
diff --git a/bindings/vala/meson.build b/bindings/vala/meson.build
new file mode 100644
index 000000000..97493cba3
--- /dev/null
+++ b/bindings/vala/meson.build
@@ -0,0 +1,5 @@
+vapidir = datadir / 'vala' / 'vapi'
+
+install_data(
+  'rb.vapi', 'rhythmdb.vapi',
+  install_dir: vapidir)
diff --git a/config.h.meson b/config.h.meson
new file mode 100644
index 000000000..40504bf47
--- /dev/null
+++ b/config.h.meson
@@ -0,0 +1,132 @@
+/* config.h.in.  Generated from configure.ac by autoheader.  */
+/* Manually converted for use by Meson. */
+
+/* Define if building universal (internal helper macro) */
+#mesondefine AC_APPLE_UNIVERSAL_BUILD
+
+/* Define to the gettext package name. */
+#mesondefine GETTEXT_PACKAGE
+
+/* Define if you have GNU fwrite_unlocked */
+#mesondefine HAVE_GNU_FWRITE_UNLOCKED
+
+/* Define if Grilo support is enabled */
+#mesondefine HAVE_GRILO
+
+/* Use GUdev for hardware detection */
+#mesondefine HAVE_GUDEV
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#mesondefine HAVE_INTTYPES_H
+
+/* Indicates whether libgpod is new enough to have its itdb_start/stop_sync
+   API */
+#mesondefine HAVE_ITDB_START_STOP_SYNC
+
+/* Have libbrasero-media */
+#mesondefine HAVE_LIBBRASERO_MEDIA
+
+/* Define if libdmapsharing support is enabled */
+#mesondefine HAVE_LIBDMAPSHARING
+
+/* Define to 1 if you have the `z' library (-lz). */
+#mesondefine HAVE_LIBZ
+
+/* Define to 1 if you have the <memory.h> header file. */
+#mesondefine HAVE_MEMORY_H
+
+/* define if Multimedia Keys are enabled */
+#mesondefine HAVE_MMKEYS
+
+/* Define if libnotify support is enabled */
+#mesondefine HAVE_NOTIFY
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#mesondefine HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#mesondefine HAVE_STDLIB_H
+
+/* Define if strftime supports %E and %O modifiers. */
+#mesondefine HAVE_STRFTIME_EXTENSION
+
+/* Define to 1 if you have the <strings.h> header file. */
+#mesondefine HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#mesondefine HAVE_STRING_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#mesondefine HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#mesondefine HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#mesondefine HAVE_UNISTD_H
+
+/* defined if you have X11/XF86keysym.h */
+#mesondefine HAVE_XFREE
+
+/* Name of package */
+#mesondefine PACKAGE
+
+/* Define to the address where bug reports for this package should be sent. */
+#mesondefine PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#mesondefine PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#mesondefine PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#mesondefine PACKAGE_TARNAME
+
+/* Define to the home page for this package. */
+#mesondefine PACKAGE_URL
+
+/* Define to the version of this package. */
+#mesondefine PACKAGE_VERSION
+
+/* Define to the level of RhythmDB sanity checking */
+#mesondefine RHYTHMDB_ENABLE_SANITY_CHECK
+
+/* path to built source data dir */
+#mesondefine SHARE_UNINSTALLED_BUILDDIR
+
+/* path to source data dir */
+#mesondefine SHARE_UNINSTALLED_DIR
+
+/* The size of `long', as computed by sizeof. */
+#mesondefine SIZEOF_LONG
+
+/* Define to 1 if you have the ANSI C header files. */
+#mesondefine STDC_HEADERS
+
+/* Define to look for files in source tree locations */
+#mesondefine USE_UNINSTALLED_DIRS
+
+/* Define if libsecret support is enabled */
+#mesondefine WITH_LIBSECRET
+
+/* Define if you are using the RhythmDB tree database */
+#mesondefine WITH_RHYTHMDB_TREE
+
+/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
+   significant byte first (like Motorola and SPARC, unlike Intel). */
+#if defined AC_APPLE_UNIVERSAL_BUILD
+# if defined __BIG_ENDIAN__
+#  define WORDS_BIGENDIAN 1
+# endif
+#else
+# ifndef WORDS_BIGENDIAN
+#  undef WORDS_BIGENDIAN
+# endif
+#endif
+
+/* Define to 1 if the X Window System is missing or not being used. */
+#mesondefine X_DISPLAY_MISSING
+#
+/* Define to the version of this package. */
+#define VERSION "@VERSION@"
diff --git a/data/icons/meson.build b/data/icons/meson.build
new file mode 100644
index 000000000..2eed7f90f
--- /dev/null
+++ b/data/icons/meson.build
@@ -0,0 +1,7 @@
+icons = [
+  'hicolor/scalable/apps/org.gnome.Rhythmbox3.svg',
+  'hicolor/scalable/apps/org.gnome.Rhythmbox3-symbolic.svg'
+]
+
+install_data(icons,
+  install_dir: datadir / 'icons' / 'hicolor' / 'scalable' / 'apps')
diff --git a/data/meson.build b/data/meson.build
new file mode 100644
index 000000000..0753760df
--- /dev/null
+++ b/data/meson.build
@@ -0,0 +1,78 @@
+subdir('icons')
+
+po_dir = meson.source_root() / 'po'
+
+desktop_files = [ 'org.gnome.Rhythmbox3.desktop', 'org.gnome.Rhythmbox3.device.desktop' ]
+foreach desktop_file : desktop_files
+  desktop_in_file = configure_file(
+    input: desktop_file + '.in.in',
+    output: desktop_file + '.in',
+    configuration: cdata
+  )
+  desktop_file = i18n.merge_file (
+    desktop_file,
+    type: 'desktop',
+    input: desktop_in_file,
+    output: desktop_file,
+    po_dir: po_dir,
+    install: true,
+    install_dir: join_paths(datadir, 'applications')
+)
+endforeach
+
+service_conf = configuration_data()
+service_conf.set('bindir', get_option('bindir'))
+
+service = 'org.gnome.Rhythmbox3.service'
+
+configure_file(
+  input: service + '.in',
+  output: service,
+  install: true,
+  install_dir: join_paths(datadir, 'dbus-1', 'services'),
+  configuration: service_conf
+)
+
+install_data('org.gnome.rhythmbox.gschema.xml',
+  install_dir: datadir / 'glib-2.0' / 'schemas')
+
+# It would be nice to avoid requiring intltool, and just use Gettext's msgfmt
+# tool. The blocker is we need to write an appropriate .its file to describe
+# how to translate Rhythmbox's XML playlist format, because msgfmt doesn't
+# support the Intltool 'generic XML style' that we currently use.
+playlists_xml = custom_target('playlists.xml',
+  input: 'playlists.xml.in',
+  output: 'playlists.xml',
+  command: [intltool_merge, '--quiet', '--xml-style', '--utf8', '../po', '@INPUT@', '@OUTPUT@'],
+)
+
+install_data('rhythmbox.gep',
+  install_dir: datadir / 'rhythmbox')
+
+
+mans = [
+  'rhythmbox.1',
+  'rhythmbox-client.1'
+]
+
+install_man(mans)
+
+appdata = 'org.gnome.Rhythmbox3.appdata.xml'
+
+appdata_file = i18n.merge_file (
+    'appdata',
+    input: appdata + '.in',
+    output: appdata,
+    install: true,
+    install_dir: join_paths(datadir, 'metainfo'),
+    po_dir: po_dir,)
+
+# Validate Appdata
+appstream_util = find_program('appstream-util', required: false)
+if appstream_util.found()
+  test(
+      'validate-appdata', appstream_util,
+      depends: appdata_file,
+      args: ['validate', '--nonet', appdata_file.full_path()]
+      )
+endif
diff --git a/doc/reference/meson.build b/doc/reference/meson.build
new file mode 100644
index 000000000..438ef7772
--- /dev/null
+++ b/doc/reference/meson.build
@@ -0,0 +1,117 @@
+doc_module = meson.project_name()
+
+private_headers = [
+  'config.h',
+  'eggwrapbox.h',
+  'eggwrapbox-enums.h',
+  'md5.h',
+  'rb-cut-and-paste-code.h',
+  'rb-thread.h',
+  'rhythmdb-private.h',
+  'rhythmdb-tree.h',
+  'mediaplayerid.h',
+  'mpid-private.h',
+  'rb-encoder-gst.h',
+  'rb-player-gst.h',
+  'rb-player-gst-helper.h',
+  'rb-player-gst-xfade.h',
+  'rb-shell-glue.h',
+  'rb-shell-binding.h',
+  'rb-shell-player-glue.h',
+  'rb-shell-player-binding.h',
+  'rb-playlist-manager-glue.h',
+  'rb-play-order-linear.h',
+  'rb-play-order-linear-loop.h',
+  'rb-play-order-queue.h',
+  'rb-play-order-random-by-age-and-rating.h',
+  'rb-play-order-random-by-age.h',
+  'rb-play-order-random-by-rating.h',
+  'rb-play-order-random-equal-weights.h',
+  'rb-play-order-shuffle.h',
+  'rb-feed-podcast-properties-dialog.h',
+  'rb-podcast-manager.h',
+  'rb-podcast-parse.h',
+  'rb-podcast-properties-dialog.h',
+  'rb-podcast-source.h',
+  'rb-podcast-main-source.h',
+  'rb-podcast-add-dialog.h',
+  'rb-podcast-search.h',
+  'rb-podcast-entry-types.h',
+  'rb-podcast-settings.h',
+  'rb-metadata-dbus.h',
+  'rb-metadata-gst-common.h',
+  'gossip-cell-renderer-expander.h',
+  'rb-query-creator-private.h',
+  'rb-import-dialog.h',
+  'rb-object-property-editor.h',
+  'rb-source-search.h',
+  'rb-source-search-basic.h',
+  'rb-playlist-xml.h',
+  'rb-sync-settings.h',
+  'rb-sync-settings-ui.h',
+  'rb-sync-state.h',
+  'rb-sync-state-ui.h',
+  'dbus-media-server-spec.h',
+  'mpris-spec.h',
+  'rb-audiocd-info.h',
+  'rb-audiocd-source.h',
+  'rb-audioscrobbler-account.h',
+  'rb-audioscrobbler-entry.h',
+  'rb-audioscrobbler.h',
+  'rb-audioscrobbler-play-order.h',
+  'rb-audioscrobbler-profile-page.h',
+  'rb-audioscrobbler-radio-source.h',
+  'rb-audioscrobbler-radio-track-entry-type.h',
+  'rb-audioscrobbler-service.h',
+  'rb-audioscrobbler-user.h',
+  'rb-daap-container-record.h',
+  'rb-daap-glue.h',
+  'rb-daap-plugin.h',
+  'rb-daap-record-factory.h',
+  'rb-daap-record.h',
+  'rb-daap-sharing.h',
+  'rb-daap-source.h',
+  'rb-daap-src.h',
+  'rb-dacp-pairing-page.h',
+  'rb-dacp-player.h',
+  'rb-dmap-container-db-adapter.h',
+  'rb-fm-radio-source.h',
+  'rb-generic-player-playlist-source.h',
+  'rb-generic-player-source.h',
+  'rb-grilo-source.h',
+  'rb-ipod-db.h',
+  'rb-ipod-helpers.h',
+  'rb-ipod-source.h',
+  'rb-ipod-static-playlist-source.h',
+  'rb-iradio-source.h',
+  'rb-iradio-source-search.h',
+  'rb-mtp-gst.h',
+  'rb-mtp-source.h',
+  'rb-mtp-thread.h',
+  'rb-musicbrainz-lookup.h',
+  'rb-nokia770-source.h',
+  'rb-plugin-macros.h',
+  'rb-psp-source.h',
+  'rb-radio-tuner.h',
+  'rb-rhythmdb-dmap-db-adapter.h',
+  'rb-rhythmdb-query-model-dmap-db-adapter.h',
+  'rb-station-properties-dialog.h',
+  'sj-metadata-marshal.h',
+  'test-utils',
+]
+
+doc_path = get_option('prefix') / gnome.gtkdoc_html_dir(doc_module)
+
+gnome.gtkdoc(
+  doc_module,
+  main_xml: doc_module + '-docs.sgml',
+  src_dir: join_paths(meson.source_root(), 'lib'),
+  gobject_typesfile: join_paths(meson.current_source_dir(), 'rhythmbox.types'),
+  dependencies: rhythmbox_core_dep,
+  scan_args: '--ignore-headers=' + ' '.join(private_headers),
+  mkdb_args: '--name-space=' + doc_module,
+  fixxref_args: '--html-dir=' + doc_path,
+  install: true,
+  install_dir: doc_path
+)
+
diff --git a/help/LINGUAS b/help/LINGUAS
new file mode 100644
index 000000000..9b929a6f0
--- /dev/null
+++ b/help/LINGUAS
@@ -0,0 +1,20 @@
+ca
+cs
+da
+de
+es
+el
+eu
+fr
+gl
+it
+ja
+oc
+pt
+pt_BR
+ro
+ru
+sl
+sv
+uk
+zh_CN
diff --git a/help/meson.build b/help/meson.build
new file mode 100644
index 000000000..c2b3f272e
--- /dev/null
+++ b/help/meson.build
@@ -0,0 +1,22 @@
+sources = [
+  'index.docbook',
+  'legal.xml'
+]
+
+media = [
+  'figures/rb-iradio-main.png',
+  'figures/rb-notification-zone.png',
+  'figures/rb-podcast-main.png',
+  'figures/rb-toolbar-prevplaynext.png',
+  'figures/rb-toolbar-repeat.png',
+  'figures/rb-toolbar-shuffle.png',
+  'figures/rb-volume-changer.png',
+  'figures/rb-window.png',
+]
+
+gnome.yelp(
+  meson.project_name(),
+  sources: sources,
+  media: media,
+  symlink_media: true
+)
diff --git a/lib/libmediaplayerid/meson.build b/lib/libmediaplayerid/meson.build
new file mode 100644
index 000000000..4cfbc5b55
--- /dev/null
+++ b/lib/libmediaplayerid/meson.build
@@ -0,0 +1,50 @@
+mpid_headers = files(
+  'mediaplayerid.h'
+)
+
+install_headers(mpid_headers, subdir: 'rhythmbox/lib/libmediaplayerid')
+
+mpid_sources = files(
+  'mpid-device.c',
+  'mpid-files.c',
+  'mpid-util.c'
+)
+
+mpid_dependencies = [gio, gio_unix, glib, gobject]
+
+# use the GUdev/media-player-id implementation if possible,
+# otherwise HAL.
+if use_gudev
+  mpid_sources += files('mpid-udev.c')
+  mpid_dependencies += [gudev]
+elif use_hal
+  mpid_sources += files('mpid-hal.c')
+  mpid_dependencies += [dbus_glib, hal]
+else
+  mpid_sources += files('mpid-dummy.c')
+endif
+
+mediaplayerid_lib = static_library('mediaplayerid',
+  mpid_sources,
+  dependencies: mpid_dependencies,
+)
+
+mediaplayerid_dep = declare_dependency(
+  link_with: mediaplayerid_lib,
+  dependencies: mpid_dependencies,
+  include_directories: include_directories('.'),
+)
+
+mpid_gir = gnome.generate_gir(mediaplayerid_lib,
+  dependencies: mpid_dependencies,
+  extra_args: [
+    '--library-path=@0@/../../lib/libmediaplayerid'.format(meson.current_build_dir()),
+  ],
+  sources: mpid_sources + mpid_headers,
+  namespace: 'MPID',
+  nsversion: '3.0',
+  identifier_prefix: 'MPID',
+  symbol_prefix: 'mpid_',
+  includes: ['GObject-2.0'],
+  install: true,
+)
diff --git a/lib/meson.build b/lib/meson.build
new file mode 100644
index 000000000..16a9cf5d3
--- /dev/null
+++ b/lib/meson.build
@@ -0,0 +1,61 @@
+subdir('libmediaplayerid')
+
+lib_headers = files(
+  'rb-builder-helpers.h',
+  'rb-debug.h',
+  'rb-file-helpers.h',
+  'rb-list-model.h',
+  'rb-stock-icons.h',
+  'rb-string-value-map.h',
+  'rb-task-progress.h',
+  'rb-task-progress-simple.h',
+  'rb-util.h',
+)
+
+install_headers(lib_headers, subdir: 'rhythmbox/lib')
+
+lib_sources = files(
+  'rb-async-copy.c',
+  'rb-async-queue-watch.c',
+  'rb-builder-helpers.c',
+  'rb-chunk-loader.c',
+  'rb-cut-and-paste-code.c',
+  'rb-debug.c',
+  'rb-file-helpers.c',
+  'rb-gst-media-types.c',
+  'rb-list-model.c',
+  'rb-missing-plugins.c',
+  'rb-stock-icons.c',
+  'rb-string-value-map.c',
+  'rb-task-progress-simple.c',
+  'rb-task-progress.c',
+  'rb-text-helpers.c',
+  'rb-tree-dnd.c',
+  'rb-util.c',
+)
+
+lib_c_args = [
+  '-DG_LOG_DOMAIN="Rhythmbox"',
+  '-DGNOMELOCALEDIR="' + datadir + '/locale"',
+  '-DSHARE_DIR="' + pkgdatadir + '"',
+  '-DDATADIR="' + datadir + '"'
+]
+
+lib_dependencies = [
+   gio, gio_unix, glib, gobject, gstreamer, gstreamer_pbutils, gtk, libpeas,
+   libpeas_gtk, libxml
+]
+
+librb = static_library('rb', lib_sources,
+  c_args: lib_c_args,
+  include_directories: [configinc],
+  dependencies: lib_dependencies,
+  install: false,
+  link_args: ['-export-dynamic']
+)
+
+librb_dep = declare_dependency(
+  link_with: librb,
+  dependencies: lib_dependencies,
+  include_directories: [configinc, include_directories('.')],
+)
diff --git a/meson.build b/meson.build
new file mode 100644
index 000000000..9039a1910
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,376 @@
+#GRILO_REQS=0.3.0
+
+project('rhythmbox', 'c',
+  version: '3.4.4',
+  meson_version: '>= 0.50.0',
+  default_options: ['c_std=gnu89'])
+
+gnome = import('gnome')
+i18n = import('i18n')
+pkg = import('pkgconfig')
+
+# plugin API versioning
+# Increment on interface addition, reset on removal
+RHYTHMBOX_CORE_AGE=0
+# Increment on interface add, remove, or change
+RHYTHMBOX_CORE_CURRENT=10
+# Increment on source change, reset when CURRENT changes.
+RHYTHMBOX_CORE_REVISION=0
+
+cdata = configuration_data()
+cc = meson.get_compiler('c')
+
+libmath = cc.find_library('m')
+
+glib_required = '2.38.0'
+gstreamer_required = '1.4.0'
+
+gdk_pixbuf = dependency('gdk-pixbuf-2.0', version: '>= 2.18.0')
+gio = dependency('gio-2.0', version: '>=' + glib_required, required: true)
+gio_unix = dependency('gio-unix-2.0', version: '>=' + glib_required, required: true)
+glib = dependency('glib-2.0', version: '>=' + glib_required, required: true)
+gobject = dependency('gobject-2.0', version: '>=' + glib_required, required: true)
+gobject_introspection = dependency('gobject-introspection-1.0', version: '>= 0.10.0', required: true)
+gstreamer = dependency('gstreamer-1.0', version: '>= ' + gstreamer_required, required: true)
+gstreamer_audio = dependency('gstreamer-audio-1.0', version: '>= ' + gstreamer_required, required: true)
+gstreamer_base = dependency('gstreamer-base-1.0', version: '>= ' + gstreamer_required, required: true)
+gstreamer_controller = dependency('gstreamer-controller-1.0', version: '>= ' + gstreamer_required, required: 
true)
+gstreamer_plugins_base = dependency('gstreamer-plugins-base-1.0', version: '>= ' + gstreamer_required, 
required: true)
+gstreamer_pbutils = dependency('gstreamer-pbutils-1.0', version: '>= ' + gstreamer_required, required: true)
+gstreamer_tag = dependency('gstreamer-tag-1.0', version: '>= ' + gstreamer_required, required: true)
+gtk = dependency('gtk+-3.0', version: '>= 3.16.0', required: true)
+json_glib = dependency('json-glib-1.0', required: true)
+libpeas = dependency('libpeas-1.0', version: '>= 0.7.3', required: true)
+libpeas_gtk = dependency('libpeas-gtk-1.0', version: '>= 0.7.3', required: true)
+libsoup = dependency('libsoup-2.4', version: '>= 2.42.0', required: true)
+libxml = dependency('libxml-2.0', version: '>= 2.7.8', required: true)
+tdb = dependency('tdb', version: '>= 1.2.6', required: true)
+totem_plparser = dependency('totem-plparser', version: '>= 3.2.0', required: true)
+zlib = dependency('zlib', required: true)
+
+intltool_merge = find_program('intltool-merge')
+
+use_gudev = false
+if get_option('gudev').allowed()
+  gudev = dependency('gudev-1.0', version: '>= 143', required: get_option('gudev'))
+  if gudev.found()
+    use_gudev = true
+    cdata.set('HAVE_GUDEV', 1)
+  endif
+endif
+
+use_ipod = false
+if get_option('ipod').allowed()
+  libgpod = dependency('libgpod-1.0', version: '>= 0.6', required: get_option('ipod'))
+  if libgpod.found()
+    use_ipod = true
+    cdata.set('HAVE_ITDB_START_STOP_SYNC', libgpod.version() >= '0.7.92')
+  endif
+endif
+
+use_mtp = false
+if get_option('mtp').allowed()
+  libmtp = dependency('libmtp', version: '>= 0.3.0', required: get_option('mtp'))
+
+  if libmtp.found()
+    if use_gudev
+      use_mtp = true
+    elif get_option('mtp').enabled()
+      error('MTP explicitly requested but GUdev is not available')
+    endif
+  endif
+endif
+
+use_notify = false
+if get_option('libnotify').allowed()
+  libnotify = dependency('libnotify', version: '>= 0.7.0', required: get_option('libnotify'))
+
+  if libnotify.found()
+    use_notify = true
+  endif
+endif
+
+use_libsecret = false
+if get_option('libsecret').allowed()
+  libsecret = dependency('libsecret-1', version: '>= 0.18', required: get_option('libsecret'))
+
+  if libsecret.found()
+    use_libsecret = true
+    cdata.set('PY_LIBSECRET_ENABLED', true)
+  endif
+endif
+
+use_lirc = false
+if get_option('lirc').allowed()
+  lirc = dependency('lirc', required: get_option('lirc'))
+
+  if lirc.found()
+    use_lirc = true
+  endif
+endif
+
+enable_mmkeys = false
+if get_option('mmkeys').allowed()
+  if cc.has_header('X11/XF86keysym.h', required: get_option('mmkeys'))
+    enable_mmkeys = true
+  endif
+endif
+
+have_libbrasero_media = false
+if get_option('brasero').allowed()
+  brasero_media = dependency('libbrasero-media3', version: '>= 2.31.5', required: get_option('brasero'))
+
+  if brasero_media.found()
+    cdata.set('HAVE_LIBBRASERO_MEDIA', 1)
+    have_libbrasero_media = true
+  endif
+endif
+
+cdata.set10('WITH_RHYTHMDB_TREE', 1)
+
+cdata.set10('RHYTHMDB_ENABLE_SANITY_CHECK', get_option('rhythmdb_debug'))
+
+have_gnu_fwrite_unlocked = cc.has_function('fwrite_unlocked')
+
+gdk_targets = run_command(['pkg-config', '--variable', 'targets', 'gdk-3.0']).stdout().strip()
+
+totem_plparser_uselibcamel = run_command(['pkg-config', '--variable', 'uselibcamel', 
'totem-plparser']).stdout().strip()
+
+if gdk_targets.contains('x11')
+  x11 = dependency('x11', required: true)
+endif
+
+if totem_plparser_uselibcamel == 'no'
+  error('totem playlist parsing library has Podcast parsing disabled')
+endif
+
+#RHYTHMBOX_CFLAGS="$RHYTHMBOX_CFLAGS $GSTREAMER_CFLAGS -DGST_USE_UNSTABLE_API"
+#RHYTHMBOX_LIBS="$RHYTHMBOX_LIBS $GSTREAMER_LIBS"
+
+test_strftime_src = '''#include <time.h>
+int main ()
+{
+  char buf[100];
+  struct tm tm = {0};
+  tm.tm_year = 99;
+  if (strftime(buf, 100, "%EY", &tm) == 4 &&
+      strcmp (buf, "1999")==0)
+    return 0;
+  return 1;
+}'''
+
+if cc.compiles(test_strftime_src, name: 'whether strftime supports %E and %O modifiers')
+  cdata.set('HAVE_STRFTIME_EXTENSION', 1)
+endif
+
+cdata.set('GETTEXT_PACKAGE', '"rhythmbox"')
+cdata.set('PACKAGE', '"rhythmbox"')
+cdata.set('VERSION', '@0@'.format(meson.project_version()))
+
+cdata.set('SHARE_UNINSTALLED_DIR', '"@0@"'.format(meson.source_root() + '/data'))
+cdata.set('SHARE_UNINSTALLED_BUILDDIR', '"@0@"'.format(meson.build_root() + '/data'))
+cdata.set('METADATA_UNINSTALLED_DIR', '"@0@"'.format(meson.build_root() + '/metadata'))
+
+# Needed so that we can build static libraries and later link them into
+# shared libraries.
+add_global_arguments('-fPIC', language: 'c')
+
+use_no_strict_aliasing = cc.has_argument('-fno-strict-aliasing')
+
+datadir = get_option('prefix') / get_option('datadir')
+libdir = get_option('prefix') / get_option('libdir')
+pkgdatadir = datadir / 'rhythmbox'
+
+#################
+# Plugin support
+
+#PLUGIN_LIBTOOL_FLAGS="-module -avoid-version"
+#AC_SUBST(PLUGIN_LIBTOOL_FLAGS)
+#
+plugindir = libdir / 'rhythmbox' / 'plugins'
+cdata.set('PLUGINDIR', plugindir)
+
+plugindatadir = datadir / 'rhythmbox' / 'plugins'
+cdata.set('PLUGINDATADIR',  plugindatadir)
+cdata.set('SAMPLEPLUGINDIR', libdir / 'rhythmbox' / 'sample-plugins')
+
+enable_python = false
+if get_option('plugins_python').allowed()
+  python = find_program('python3', required: get_option('plugins_python'))
+  pygobject = dependency('pygobject-3.0', version: '>= 3.0.0', required: get_option('plugins_python'))
+  pyoverridesdir = run_command([python, '-c', '''import gi; print(gi._overridesdir)''']).stdout().strip()
+  enable_python = true
+endif
+
+enable_vala = false
+if get_option('plugins_vala').allowed()
+  vala_found = add_languages('vala', required: get_option('plugins_vala'))
+  enable_vala = true
+  vapi_dir = meson.current_source_dir() / 'bindings' / 'vala'
+  add_project_arguments(['--vapidir', vapi_dir], language: 'vala')
+endif
+
+##########
+# Plugins
+
+enable_fm_radio = false
+if get_option('fm_radio').allowed()
+  if cc.has_header('linux/videodev2.h')
+    enable_fm_radio = true
+  elif get_option('fm_radio') == 'enabled'
+    error('FM radio plugin explicitly requested, but cannot be built')
+  endif
+endif
+
+have_libdmapsharing = false
+if get_option('daap').allowed()
+  libdmapsharing = dependency('libdmapsharing-3.0', version: '>= 2.9.19', required: get_option('daap'))
+
+  if libdmapsharing.found()
+    cdata.set('HAVE_LIBDMAPSHARING', 1)
+    have_libdmapsharing = true
+  endif
+endif
+
+enable_grilo = false
+if get_option('grilo').allowed()
+  grilo = dependency('grilo-0.3', version: '>= 0.3.0', required: get_option('grilo'))
+
+  if grilo.found()
+    enable_grilo = true
+    cdata.set('HAVE_GRILO', 1)
+  endif
+endif
+
+pkg.generate(
+  name: 'rhythmbox',
+  description: 'plugin API for rhythmbox',
+  requires: [glib, gobject, gio, gtk, libsoup, totem_plparser, gstreamer],
+  requires_private: libxml,
+  variables: [
+    'plugin_dir=' + plugindir,
+  ]
+)
+
+configure_file(input : 'config.h.meson',
+  output : 'config.h',
+configuration : cdata)
+
+message('Rhythmbox was configured with the following options:')
+if get_option('database') == 'tree'
+  message('** Tree database is enabled')
+else
+  error('Unknown database!')
+endif
+if get_option('rhythmdb_debug') == '0'
+  message('** RhythmDB sanity checking enabled (may be slow!)')
+endif
+
+if enable_mmkeys
+  message('   Multimedia keys support is disabled')
+else
+  message('** Multimedia keys support is enabled')
+endif
+
+if use_ipod
+  message('** iPod integration enabled')
+else
+  message('   iPod integration disabled')
+endif
+if use_mtp
+  message('** MTP integration enabled')
+else
+  message('   MTP integration disabled')
+endif
+if have_libbrasero_media
+  message('** CD burning support enabled')
+else
+  message('   CD burning support disabled')
+endif
+if have_libdmapsharing
+  message('** DAAP (music sharing) support is enabled')
+else
+  message('   DAAP (music sharing) support is disabled')
+endif
+if use_notify
+  message('** libnotify support is enabled')
+else
+  message('   libnotify support is disabled')
+endif
+if use_gudev
+  message('** GUdev support enabled')
+else
+  message('   GUdev support disabled')
+endif
+if enable_python
+  message('** Python plugin support enabled')
+else
+  message('   Python plugin support disabled')
+endif
+if enable_vala
+  message('** Vala plugin support enabled')
+else
+  message('   Vala plugin support disabled')
+endif
+if use_libsecret
+  message('** Libsecret keyring support enabled')
+else
+  message('   Libsecret keyring support disabled')
+endif
+if enable_fm_radio
+  message('** FM radio support enabled')
+else
+  message('   FM radio support disabled')
+endif
+
+message('End options')
+
+configinc = include_directories('.')
+libinc = include_directories('lib')
+mpidinc = include_directories('lib/libmediaplayerid')
+metadatainc = include_directories('metadata')
+rhythmdbinc = include_directories('rhythmdb')
+backendsinc = include_directories('backends')
+pluginsinc = include_directories('plugins')
+podcastinc = include_directories('podcast')
+shellinc = include_directories('shell')
+sourcesinc = include_directories('sources')
+sourcessyncinc = include_directories('sources/sync')
+widgetsinc = include_directories('widgets')
+
+rpath = '@0@/@1@'.format(get_option('prefix'), get_option('libdir'))
+
+subdir('data')
+
+subdir('lib')
+subdir('metadata')
+subdir('rhythmdb')
+subdir('backends')
+subdir('podcast')
+subdir('sources')
+subdir('widgets')
+subdir('shell')
+subdir('plugins')
+if get_option('sample-plugins')
+  subdir('sample-plugins')
+endif
+subdir('remote')
+
+subdir('bindings')
+subdir('tests')
+subdir('po')
+if get_option('gtk_doc')
+  subdir('doc/reference')
+endif
+if get_option('help')
+  subdir('help')
+endif
+
+# Some tests that can't be defined in the subdirs because rhythmbox_core_dep
+# must be defined first.
+
+test_metadata = executable('test-metadata',
+  'metadata/test-metadata.c',
+  dependencies: rhythmbox_core_dep)
+test('test-metadata', test_metadata)
+
diff --git a/meson_options.txt b/meson_options.txt
new file mode 100644
index 000000000..a30f399f4
--- /dev/null
+++ b/meson_options.txt
@@ -0,0 +1,37 @@
+option('brasero', type: 'feature', value: 'auto',
+       description: 'Enable disc burning support using libbrasero-media')
+option('daap', type: 'feature', value: 'auto',
+       description: 'Enable DAAP sharing support using libdmapsharing')
+option('fm_radio', type: 'feature', value: 'auto',
+       description: 'Enable FM radio support')
+option('grilo', type: 'feature', value: 'auto',
+       description: 'Enable Grilo support')
+option('gudev', type: 'feature', value: 'auto',
+       description: 'Enable GUdev for hardware detection')
+option('ipod', type: 'feature', value: 'auto',
+       description: 'Enable iPod support')
+option('libnotify', type: 'feature', value: 'auto',
+       description: 'Enable desktop notifications with libnotify')
+option('libsecret', type: 'feature', value: 'auto',
+       description: 'Enable keyring support using libsecret')
+option('lirc', type: 'feature', value: 'auto',
+       description: 'Enable lirc support')
+option('mmkeys', type: 'feature', value: 'auto',
+       description: 'Enable multimedia keys support')
+option('mtp', type: 'feature', value: 'auto',
+       description: 'Enable MTP support')
+option('plugins_python', type: 'feature', value: 'auto',
+       description: 'Enable Python plugins')
+option('plugins_vala', type: 'feature', value: 'auto',
+       description: 'Enable Vala plugins')
+option('sample-plugins', type: 'boolean', value: 'false',
+       description: 'Whether to install sample plugins')
+
+option('help', type: 'boolean', value: 'true',
+       description: 'Install user documentation')
+option('gtk_doc', type: 'boolean', value: 'false',
+       description: 'Use gtk-doc to build documentation')
+option('database', type: 'combo', choices: ['tree'], value: 'tree',
+       description: 'Select the database to use (default tree)')
+option('rhythmdb_debug', type: 'combo', choices: ['0', '1', '2'], value: '0',
+       description: 'Level of RhythmDB sanity checking')
diff --git a/metadata/meson.build b/metadata/meson.build
new file mode 100644
index 000000000..8e4b75a29
--- /dev/null
+++ b/metadata/meson.build
@@ -0,0 +1,70 @@
+metadata_headers = files(
+  'rb-ext-db-key.h',
+  'rb-ext-db.h',
+  'rb-metadata.h'
+)
+
+install_headers(metadata_headers, subdir: 'rhythmbox/metadata')
+
+metadata_sources = files(
+  'rb-ext-db-key.c',
+  'rb-ext-db.c',
+  'rb-metadata-common.c',
+  'rb-metadata-dbus.c',
+  'rb-metadata-dbus-client.c'
+)
+
+metadata_service_sources = [
+  'rb-metadata-common.c',
+  'rb-metadata-dbus.c',
+  'rb-metadata-gst.c',
+  'rb-metadata-gst-common.c'
+]
+
+metadata_dbus_service_sources = [
+  'rb-metadata-dbus-service.c'
+]
+
+metadata_c_args = [
+  '-DGNOMELOCALEDIR="' + datadir + '/locale"',
+  '-DG_LOG_DOMAIN="Rhythmbox"',
+  '-DLIBEXEC_DIR="' + get_option('libexecdir') + '"',
+  # In configure.ac this variable was theoretically customizable by passing
+  # --program-suffix when running 'configure', but it's not clear how
+  # that would actually work or whether anyone used it.
+  '-DINSTALLED_METADATA_HELPER="rhythmbox-metadata"'
+]
+
+if use_no_strict_aliasing
+  metadata_c_args += ['-fno-strict-aliasing']
+endif
+
+metadata_deps = [tdb, gstreamer, gstreamer_pbutils, gstreamer_tag]
+
+# client library
+
+rbmetadata_lib = static_library('rbmetadata', metadata_sources,
+  c_args: metadata_c_args,
+  dependencies: [metadata_deps, librb_dep],
+  install: false,
+  link_args: ['-export-dynamic']
+)
+
+rbmetadata_dep = declare_dependency(
+  link_with: rbmetadata_lib,
+  dependencies: metadata_deps,
+  include_directories: include_directories('.'),
+)
+
+# service
+
+rbmetadatasvc_lib = static_library('rbmetadatasvc', metadata_service_sources,
+  dependencies: [librb_dep, rbmetadata_dep, gtk])
+
+executable('rhythmbox-metadata', metadata_dbus_service_sources,
+  link_with: rbmetadatasvc_lib,
+  dependencies: [librb_dep, rbmetadata_dep, gtk],
+  install: true,
+  install_dir: get_option('libexecdir'),
+  install_rpath: rpath
+)
diff --git a/plugins/android/meson.build b/plugins/android/meson.build
new file mode 100644
index 000000000..bee06158b
--- /dev/null
+++ b/plugins/android/meson.build
@@ -0,0 +1,25 @@
+android_plugin_dir = plugindir + '/android'
+
+android_resources = gnome.compile_resources('android-resources',
+  'android.gresource.xml',
+  source_dir: meson.current_source_dir())
+
+android_sources = [
+  android_resources,
+  'rb-android-plugin.c',
+  'rb-android-source.c']
+
+shared_module('android',
+  android_sources,
+  c_args: ['-DHAVE_CONFIG_H'],
+  dependencies: [rhythmbox_core_dep, gudev],
+  include_directories: pluginsinc,
+  install: true,
+  install_dir: android_plugin_dir)
+
+android_plugin_descriptor = custom_target('android-plugin-descriptor',
+  input: 'android.plugin.in',
+  output: 'android.plugin',
+  command: [intltool_merge, '--quiet', '--desktop-style', meson.source_root() + '/po', '@INPUT@', 
'@OUTPUT@'],
+  install: true,
+  install_dir: android_plugin_dir)
diff --git a/plugins/artsearch/meson.build b/plugins/artsearch/meson.build
new file mode 100644
index 000000000..1bba92056
--- /dev/null
+++ b/plugins/artsearch/meson.build
@@ -0,0 +1,20 @@
+artsearch_plugin_dir = plugindir + '/artsearch'
+
+artsearch_plugin_files = [
+  'artsearch.py',
+  'songinfo.py',
+  'embedded.py',
+  'lastfm.py',
+  'local.py',
+  'musicbrainz.py',
+  'oldcache.py']
+
+install_data(artsearch_plugin_files,
+  install_dir: artsearch_plugin_dir)
+
+artsearch_plugin_descriptor = custom_target('artsearch-plugin-descriptor',
+  input: 'artsearch.plugin.in',
+  output: 'artsearch.plugin',
+  command: [intltool_merge, '--quiet', '--desktop-style', meson.source_root() + '/po', '@INPUT@', 
'@OUTPUT@'],
+  install: true,
+  install_dir: artsearch_plugin_dir)
diff --git a/plugins/audiocd/meson.build b/plugins/audiocd/meson.build
new file mode 100644
index 000000000..d6a9ed65f
--- /dev/null
+++ b/plugins/audiocd/meson.build
@@ -0,0 +1,32 @@
+audiocd_plugin_dir = plugindir + '/audiocd'
+
+audiocd_resources = gnome.compile_resources('audiocd-resources',
+  'audiocd.gresource.xml',
+  source_dir: meson.current_source_dir())
+
+audiocd_sources = [
+  audiocd_resources,
+  'rb-audiocd-info.c',
+  'rb-audiocd-plugin.c',
+  'rb-audiocd-source.c',
+  'rb-musicbrainz-lookup.c']
+
+shared_module('audiocd',
+  audiocd_sources,
+  dependencies: [rhythmbox_core_dep, totem_plparser],
+  include_directories: pluginsinc,
+  install: true,
+  install_dir: audiocd_plugin_dir)
+
+audiocd_plugin_descriptor = custom_target('audiocd-plugin-descriptor',
+  input: 'audiocd.plugin.in',
+  output: 'audiocd.plugin',
+  command: [intltool_merge, '--quiet', '--desktop-style', meson.source_root() + '/po', '@INPUT@', 
'@OUTPUT@'],
+  install: true,
+  install_dir: audiocd_plugin_dir)
+
+executable('test-cd',
+  'test-cd.c',
+  'rb-audiocd-info.c',
+  'rb-musicbrainz-lookup.c',
+  dependencies: [rhythmbox_core_dep, totem_plparser])
diff --git a/plugins/audioscrobbler/meson.build b/plugins/audioscrobbler/meson.build
new file mode 100644
index 000000000..92d4bedcb
--- /dev/null
+++ b/plugins/audioscrobbler/meson.build
@@ -0,0 +1,50 @@
+audioscrobbler_plugin_dir = plugindir + '/audioscrobbler'
+audioscrobbler_plugin_data_dir = plugindatadir + '/audioscrobbler'
+
+audioscrobbler_sources = [
+  'rb-audioscrobbler-plugin.c',
+  'rb-audioscrobbler-entry.c',
+  'rb-audioscrobbler-profile-page.c',
+  'rb-audioscrobbler-account.c',
+  'rb-audioscrobbler-service.c',
+  'rb-audioscrobbler-user.c',
+  'rb-audioscrobbler.c',
+  'rb-audioscrobbler-radio-source.c',
+  'rb-audioscrobbler-radio-track-entry-type.c',
+  'rb-audioscrobbler-play-order.c']
+
+audioscrobbler_test_sources = [
+  'rb-audioscrobbler-entry.c',
+  'rb-audioscrobbler-radio-track-entry-type.c']
+
+shared_module('audioscrobbler',
+  audioscrobbler_sources,
+  c_args: ['-DHAVE_CONFIG_H'],
+  dependencies: [rhythmbox_core_dep, json_glib, totem_plparser],
+  install: true,
+  install_dir: audioscrobbler_plugin_dir)
+
+audioscrobbler_plugin_descriptor = custom_target('audioscrobbler-plugin-descriptor',
+  input: 'audioscrobbler.plugin.in',
+  output: 'audioscrobbler.plugin',
+  command: [intltool_merge, '--quiet', '--desktop-style', meson.source_root() + '/po', '@INPUT@', 
'@OUTPUT@'],
+  install: true,
+  install_dir: audioscrobbler_plugin_dir)
+
+install_data(
+  'icons/hicolor/scalable/places/Last.fm-symbolic.svg',
+  install_dir: audioscrobbler_plugin_data_dir + '/icons/hicolor/scalable/places')
+
+install_data(
+  'audioscrobbler-preferences.ui',
+  'audioscrobbler-profile.ui',
+  install_dir: audioscrobbler_plugin_data_dir)
+
+libaudioscrobbler_test = library('audioscrobbler-test',
+  audioscrobbler_test_sources,
+  dependencies: rhythmbox_core_dep)
+
+audioscrobbler_test_dep = declare_dependency(
+  link_with: libaudioscrobbler_test,
+  include_directories: include_directories('.')
+)
diff --git a/plugins/brasero-disc-recorder/meson.build b/plugins/brasero-disc-recorder/meson.build
new file mode 100644
index 000000000..952fe2e2c
--- /dev/null
+++ b/plugins/brasero-disc-recorder/meson.build
@@ -0,0 +1,20 @@
+brasero_disc_recorder_plugin_dir = plugindir + '/cd-recorder'
+brasero_disc_recorder_plugin_data_dir = plugindatadir + '/cd-recorder'
+
+brasero_disc_recorder_sources = [
+  'rb-disc-recorder-plugin.c'
+]
+
+shared_module('cd-recorder',
+  brasero_disc_recorder_sources,
+  c_args: ['-DHAVE_CONFIG_H'],
+  dependencies: [rhythmbox_core_dep, brasero_media],
+  install: true,
+  install_dir: brasero_disc_recorder_plugin_dir)
+
+brasero_disc_recorder_plugin_descriptor = custom_target('brasero-disc-recorder-plugin-descriptor',
+  input: 'cd-recorder.plugin.in',
+  output: 'cd-recorder.plugin',
+  command: [intltool_merge, '--quiet', '--desktop-style', meson.source_root() + '/po', '@INPUT@', 
'@OUTPUT@'],
+  install: true,
+  install_dir: brasero_disc_recorder_plugin_dir)
diff --git a/plugins/context/meson.build b/plugins/context/meson.build
new file mode 100644
index 000000000..1e05726c2
--- /dev/null
+++ b/plugins/context/meson.build
@@ -0,0 +1,39 @@
+context_plugin_dir = plugindir + '/context'
+context_plugin_data_dir = plugindatadir + '/context'
+
+context_plugin_files = [
+  'AlbumTab.py',
+  'ArtistTab.py',
+  'ContextView.py',
+  'LastFM.py',
+  'LinksTab.py',
+  'LyricsTab.py',
+  'context.py'
+]
+
+install_data(context_plugin_files,
+  install_dir: context_plugin_dir)
+
+context_plugin_descriptor = custom_target('context-plugin-descriptor',
+  input: 'context.plugin.in',
+  output: 'context.plugin',
+  command: [intltool_merge, '--quiet', '--desktop-style', meson.source_root() + '/po', '@INPUT@', 
'@OUTPUT@'],
+  install: true,
+  install_dir: context_plugin_dir)
+
+install_data([
+  'tmpl/album-tmpl.html',
+  'tmpl/artist-tmpl.html',
+  'tmpl/loading.html',
+  'tmpl/links-tmpl.html',
+  'tmpl/lyrics-tmpl.html',
+  'tmpl/main.css'],
+  install_dir: context_plugin_data_dir + '/tmpl')
+
+install_data([
+  'img/lastfm.png',
+  'img/spinner.gif',
+  'img/links/Allmusic16x16.png',
+  'img/links/Discogs16x16.png',
+  'img/links/Wikipedia16x16.png'],
+  install_dir: context_plugin_data_dir + '/img')
diff --git a/plugins/daap/meson.build b/plugins/daap/meson.build
new file mode 100644
index 000000000..8bc0239a2
--- /dev/null
+++ b/plugins/daap/meson.build
@@ -0,0 +1,42 @@
+daap_plugin_dir = plugindir + '/daap'
+daap_plugin_data_dir = plugindatadir + '/daap'
+
+daap_resources = gnome.compile_resources('daap-resources',
+  'daap.gresource.xml',
+  source_dir: meson.current_source_dir())
+
+daap_sources = [
+  daap_resources,
+  'rb-daap-container-record.c',
+  'rb-daap-plugin.c',
+  'rb-daap-record.c',
+  'rb-daap-record-factory.c',
+  'rb-daap-sharing.c',
+  'rb-daap-source.c',
+  'rb-daap-src.c',
+  'rb-dmap-container-db-adapter.c',
+  'rb-dacp-pairing-page.c',
+  'rb-dacp-player.c',
+  'rb-rhythmdb-dmap-db-adapter.c',
+  'rb-rhythmdb-query-model-dmap-db-adapter.c',
+]
+
+daap_dependencies = [rhythmbox_core_dep, libdmapsharing]
+
+if use_libsecret
+  daap_dependencies += libsecret
+endif
+
+shared_module('daap',
+  daap_sources,
+  c_args: ['-DHAVE_CONFIG_H'],
+  dependencies: daap_dependencies,
+  install: true,
+  install_dir: daap_plugin_dir)
+
+daap_plugin_descriptor = custom_target('daap-plugin-descriptor',
+  input: 'daap.plugin.in',
+  output: 'daap.plugin',
+  command: [intltool_merge, '--quiet', '--desktop-style', meson.source_root() + '/po', '@INPUT@', 
'@OUTPUT@'],
+  install: true,
+  install_dir: daap_plugin_dir)
diff --git a/plugins/dbus-media-server/meson.build b/plugins/dbus-media-server/meson.build
new file mode 100644
index 000000000..6902bc4bb
--- /dev/null
+++ b/plugins/dbus-media-server/meson.build
@@ -0,0 +1,20 @@
+dbus_media_server_plugin_dir = plugindir + '/dbus-media-server'
+dbus_media_server_plugin_data_dir = plugindatadir + '/dbus-media-server'
+
+dbus_media_server_sources = [
+  'rb-dbus-media-server-plugin.c'
+]
+
+shared_module('dbus-media-server',
+  dbus_media_server_sources,
+  c_args: ['-DHAVE_CONFIG_H'],
+  dependencies: [rhythmbox_core_dep],
+  install: true,
+  install_dir: dbus_media_server_plugin_dir)
+
+dbus_media_server_plugin_descriptor = custom_target('dbus-media-server-plugin-descriptor',
+  input: 'dbus-media-server.plugin.in',
+  output: 'dbus-media-server.plugin',
+  command: [intltool_merge, '--quiet', '--desktop-style', meson.source_root() + '/po', '@INPUT@', 
'@OUTPUT@'],
+  install: true,
+  install_dir: dbus_media_server_plugin_dir)
diff --git a/plugins/fmradio/meson.build b/plugins/fmradio/meson.build
new file mode 100644
index 000000000..e1a843afb
--- /dev/null
+++ b/plugins/fmradio/meson.build
@@ -0,0 +1,28 @@
+fmradio_plugin_dir = plugindir + '/fmradio'
+fmradio_plugin_data_dir = plugindatadir + '/fmradio'
+
+fmradio_resources = gnome.compile_resources('fmradio-resources',
+  'fmradio.gresource.xml',
+  source_dir: meson.current_source_dir())
+
+fmradio_sources = [
+  fmradio_resources,
+  'rb-fm-radio-plugin.c',
+  'rb-fm-radio-source.c',
+  'rb-fm-radio-gst-src.c',
+  'rb-radio-tuner-v4l2.c'
+]
+
+shared_module('fmradio',
+  fmradio_sources,
+  c_args: ['-DHAVE_CONFIG_H'],
+  dependencies: [rhythmbox_core_dep],
+  install: true,
+  install_dir: fmradio_plugin_dir)
+
+fmradio_plugin_descriptor = custom_target('fmradio-plugin-descriptor',
+  input: 'fmradio.plugin.in',
+  output: 'fmradio.plugin',
+  command: [intltool_merge, '--quiet', '--desktop-style', meson.source_root() + '/po', '@INPUT@', 
'@OUTPUT@'],
+  install: true,
+  install_dir: fmradio_plugin_dir)
diff --git a/plugins/generic-player/meson.build b/plugins/generic-player/meson.build
new file mode 100644
index 000000000..97650c96d
--- /dev/null
+++ b/plugins/generic-player/meson.build
@@ -0,0 +1,28 @@
+generic_player_plugin_dir = plugindir + '/generic-player'
+
+generic_player_resources = gnome.compile_resources('generic-player-resources',
+  'generic-player.gresource.xml',
+  source_dir: meson.current_source_dir())
+
+generic_player_sources = [
+  generic_player_resources,
+  'rb-generic-player-plugin.c',
+  'rb-generic-player-source.c',
+  'rb-generic-player-playlist-source.c',
+  'rb-nokia770-source.c',
+  'rb-psp-source.c',
+]
+
+shared_module('generic-player',
+  generic_player_sources,
+  c_args: ['-DHAVE_CONFIG_H'],
+  dependencies: [rhythmbox_core_dep],
+  install: true,
+  install_dir: generic_player_plugin_dir)
+
+generic_player_plugin_descriptor = custom_target('generic-player-plugin-descriptor',
+  input: 'generic-player.plugin.in',
+  output: 'generic-player.plugin',
+  command: [intltool_merge, '--quiet', '--desktop-style', meson.source_root() + '/po', '@INPUT@', 
'@OUTPUT@'],
+  install: true,
+  install_dir: generic_player_plugin_dir)
diff --git a/plugins/grilo/meson.build b/plugins/grilo/meson.build
new file mode 100644
index 000000000..980e6c428
--- /dev/null
+++ b/plugins/grilo/meson.build
@@ -0,0 +1,23 @@
+grilo_plugin_dir = plugindir + '/grilo'
+grilo_plugin_data_dir = plugindatadir + '/grilo'
+
+grilo_sources = [
+  'rb-grilo-plugin.c',
+  'rb-grilo-source.c'
+]
+
+grilo_dependencies = [rhythmbox_core_dep, grilo]
+
+shared_module('grilo',
+  grilo_sources,
+  c_args: ['-DHAVE_CONFIG_H'],
+  dependencies: grilo_dependencies,
+  install: true,
+  install_dir: grilo_plugin_dir)
+
+grilo_plugin_descriptor = custom_target('grilo-plugin-descriptor',
+  input: 'grilo.plugin.in',
+  output: 'grilo.plugin',
+  command: [intltool_merge, '--quiet', '--desktop-style', meson.source_root() + '/po', '@INPUT@', 
'@OUTPUT@'],
+  install: true,
+  install_dir: grilo_plugin_dir)
diff --git a/plugins/im-status/meson.build b/plugins/im-status/meson.build
new file mode 100644
index 000000000..9ae65e42e
--- /dev/null
+++ b/plugins/im-status/meson.build
@@ -0,0 +1,14 @@
+im_status_plugin_dir = plugindir + '/im-status'
+
+im_status_plugin_files = [
+  'im-status.py']
+
+install_data(im_status_plugin_files,
+  install_dir: im_status_plugin_dir)
+
+im_status_plugin_descriptor = custom_target('im-status-plugin-descriptor',
+  input: 'im-status.plugin.in',
+  output: 'im-status.plugin',
+  command: [intltool_merge, '--quiet', '--desktop-style', meson.source_root() + '/po', '@INPUT@', 
'@OUTPUT@'],
+  install: true,
+  install_dir: im_status_plugin_dir)
diff --git a/plugins/ipod/meson.build b/plugins/ipod/meson.build
new file mode 100644
index 000000000..bad79b601
--- /dev/null
+++ b/plugins/ipod/meson.build
@@ -0,0 +1,31 @@
+ipod_plugin_dir = plugindir + '/ipod'
+ipod_plugin_data_dir = plugindatadir + '/ipod'
+
+ipod_resources = gnome.compile_resources('ipod-resources',
+  'ipod.gresource.xml',
+  source_dir: meson.current_source_dir())
+
+ipod_sources = [
+  ipod_resources,
+  'rb-ipod-db.c',
+  'rb-ipod-helpers.c',
+  'rb-ipod-static-playlist-source.c',
+  'rb-ipod-source.c',
+  'rb-ipod-plugin.c'
+]
+
+ipod_dependencies = [rhythmbox_core_dep, libgpod]
+
+shared_module('ipod',
+  ipod_sources,
+  c_args: ['-DHAVE_CONFIG_H'],
+  dependencies: ipod_dependencies,
+  install: true,
+  install_dir: ipod_plugin_dir)
+
+ipod_plugin_descriptor = custom_target('ipod-plugin-descriptor',
+  input: 'ipod.plugin.in',
+  output: 'ipod.plugin',
+  command: [intltool_merge, '--quiet', '--desktop-style', meson.source_root() + '/po', '@INPUT@', 
'@OUTPUT@'],
+  install: true,
+  install_dir: ipod_plugin_dir)
diff --git a/plugins/iradio/meson.build b/plugins/iradio/meson.build
new file mode 100644
index 000000000..fa5226591
--- /dev/null
+++ b/plugins/iradio/meson.build
@@ -0,0 +1,30 @@
+iradio_plugin_dir = plugindir + '/iradio'
+iradio_plugin_data_dir = plugindatadir + '/iradio'
+
+iradio_resources = gnome.compile_resources('iradio-resources',
+  'iradio.gresource.xml',
+  source_dir: meson.current_source_dir())
+
+iradio_sources = [
+  iradio_resources,
+  'rb-iradio-plugin.c',
+  'rb-iradio-source.c',
+  'rb-iradio-source-search.c',
+  'rb-station-properties-dialog.c',
+]
+
+iradio_dependencies = [rhythmbox_core_dep]
+
+shared_module('iradio',
+  iradio_sources,
+  c_args: ['-DHAVE_CONFIG_H'],
+  dependencies: iradio_dependencies,
+  install: true,
+  install_dir: iradio_plugin_dir)
+
+iradio_plugin_descriptor = custom_target('iradio-plugin-descriptor',
+  input: 'iradio.plugin.in',
+  output: 'iradio.plugin',
+  command: [intltool_merge, '--quiet', '--desktop-style', meson.source_root() + '/po', '@INPUT@', 
'@OUTPUT@'],
+  install: true,
+  install_dir: iradio_plugin_dir)
diff --git a/plugins/lirc/meson.build b/plugins/lirc/meson.build
new file mode 100644
index 000000000..7df0e3cae
--- /dev/null
+++ b/plugins/lirc/meson.build
@@ -0,0 +1,23 @@
+lirc_plugin_dir = plugindir + '/rblirc'
+lirc_plugin_data_dir = plugindatadir + '/rblirc'
+
+lirc_sources = [
+  'rb-lirc-plugin.c'
+]
+
+shared_module('rblirc',
+  lirc_sources,
+  c_args: ['-DHAVE_CONFIG_H'],
+  dependencies: [rhythmbox_core_dep, lirc],
+  install_dir: lirc_plugin_dir,
+  install: true)
+
+lirc_plugin_descriptor = custom_target('lirc-plugin-descriptor',
+  input: 'rblirc.plugin.in',
+  output: 'rblirc.plugin',
+  command: [intltool_merge, '--quiet', '--desktop-style', meson.source_root() + '/po', '@INPUT@', 
'@OUTPUT@'],
+  install: true,
+  install_dir: lirc_plugin_dir)
+
+install_data('rhythmbox_lirc_default',
+  install_dir: lirc_plugin_data_dir)
diff --git a/plugins/listenbrainz/meson.build b/plugins/listenbrainz/meson.build
new file mode 100644
index 000000000..03c3c1728
--- /dev/null
+++ b/plugins/listenbrainz/meson.build
@@ -0,0 +1,22 @@
+listenbrainz_plugin_dir = plugindir + '/listenbrainz'
+listenbrainz_plugin_data_dir = plugindatadir + '/listenbrainz'
+
+listenbrainz_plugin_files = [
+  'client.py',
+  'listenbrainz.py',
+  'queue.py',
+  'settings.py',
+]
+
+install_data(listenbrainz_plugin_files,
+  install_dir: listenbrainz_plugin_dir)
+
+install_data(['settings.ui'],
+  install_dir: listenbrainz_plugin_data_dir)
+
+listenbrainz_plugin_descriptor = custom_target('listenbrainz-plugin-descriptor',
+  input: 'listenbrainz.plugin.in',
+  output: 'listenbrainz.plugin',
+  command: [intltool_merge, '--quiet', '--desktop-style', meson.source_root() + '/po', '@INPUT@', 
'@OUTPUT@'],
+  install: true,
+  install_dir: listenbrainz_plugin_dir)
diff --git a/plugins/lyrics/meson.build b/plugins/lyrics/meson.build
new file mode 100644
index 000000000..a3652969f
--- /dev/null
+++ b/plugins/lyrics/meson.build
@@ -0,0 +1,28 @@
+lyrics_plugin_dir = plugindir + '/lyrics'
+lyrics_plugin_data_dir = plugindatadir + '/lyrics'
+
+lyrics_plugin_files = [
+  'LyricsParse.py',
+  'LyricsSites.py',
+  'LyricsConfigureDialog.py',
+  'lyrics.py',
+  'AstrawebParser.py',
+  'LyricWikiParser.py',
+  'WinampcnParser.py',
+  'TerraParser.py',
+  'DarkLyricsParser.py',
+  'JlyricParser.py',
+  'JetlyricsParser.py']
+
+install_data(lyrics_plugin_files,
+  install_dir: lyrics_plugin_dir)
+
+lyrics_plugin_descriptor = custom_target('lyrics-plugin-descriptor',
+  input: 'lyrics.plugin.in',
+  output: 'lyrics.plugin',
+  command: [intltool_merge, '--quiet', '--desktop-style', meson.source_root() + '/po', '@INPUT@', 
'@OUTPUT@'],
+  install: true,
+  install_dir: lyrics_plugin_dir)
+
+install_data('lyrics-prefs.ui',
+  install_dir: lyrics_plugin_data_dir)
diff --git a/plugins/magnatune/icons/hicolor/scalable/places/meson.build 
b/plugins/magnatune/icons/hicolor/scalable/places/meson.build
new file mode 100644
index 000000000..e1b613de7
--- /dev/null
+++ b/plugins/magnatune/icons/hicolor/scalable/places/meson.build
@@ -0,0 +1,3 @@
+install_data('magnatune-symbolic.svg',
+  install_dir: magnatune_plugin_data_dir / 'icons' / 'hicolor' /
+               'scalable' / 'places')
diff --git a/plugins/magnatune/meson.build b/plugins/magnatune/meson.build
new file mode 100644
index 000000000..d1768692e
--- /dev/null
+++ b/plugins/magnatune/meson.build
@@ -0,0 +1,30 @@
+magnatune_plugin_dir = plugindir + '/magnatune'
+magnatune_plugin_data_dir = plugindatadir + '/magnatune'
+
+magnatune_plugin_files = [
+  'MagnatuneSource.py',
+  'DownloadAlbumHandler.py',
+  'TrackListHandler.py',
+  'MagnatuneAccount.py',
+  'magnatune.py']
+
+install_data(magnatune_plugin_files,
+  install_dir: magnatune_plugin_dir)
+
+magnatune_plugin_descriptor = custom_target('magnatune-plugin-descriptor',
+  input: 'magnatune.plugin.in',
+  output: 'magnatune.plugin',
+  command: [intltool_merge, '--quiet', '--desktop-style', meson.source_root() + '/po', '@INPUT@', 
'@OUTPUT@'],
+  install: true,
+  install_dir: magnatune_plugin_dir)
+
+install_data([
+  'magnatune-loading.ui',
+  'magnatune-popup.ui',
+  'magnatune-prefs.ui',
+  'magnatune-toolbar.ui',
+  'magnatune_logo_color_small.png',
+  'magnatune_logo_color_tiny.png'],
+  install_dir: magnatune_plugin_data_dir)
+
+subdir('icons/hicolor/scalable/places/')
diff --git a/plugins/meson.build b/plugins/meson.build
new file mode 100644
index 000000000..0ec8b8f72
--- /dev/null
+++ b/plugins/meson.build
@@ -0,0 +1,65 @@
+plugin_headers = ['rb-plugin-macros.h']
+
+install_headers(plugin_headers, subdir: 'rhythmbox/plugins')
+
+subdir('audiocd')
+subdir('audioscrobbler')
+subdir('dbus-media-server')
+subdir('generic-player')
+subdir('iradio')
+subdir('mmkeys')
+subdir('mpris')
+subdir('power-manager')
+
+if enable_python
+  subdir('artsearch')
+  subdir('im-status')
+  subdir('listenbrainz')
+  subdir('lyrics')
+  subdir('magnatune')
+  subdir('pythonconsole')
+  subdir('rbzeitgeist')
+  subdir('replaygain')
+  subdir('soundcloud')
+  subdir('webremote')
+  subdir('rb')
+
+  # Disabled since 67b24c9c6b3b8d9b95924b319407eb770c9bab11
+  # subdir('context')
+endif
+
+if use_lirc
+  subdir('lirc')
+endif
+
+if use_ipod
+  subdir('ipod')
+endif
+
+if have_libbrasero_media
+  subdir('brasero-disc-recorder')
+endif
+
+if have_libdmapsharing
+  subdir('daap')
+endif
+
+if use_mtp
+  subdir('mtpdevice')
+endif
+
+if enable_fm_radio
+  subdir('fmradio')
+endif
+
+if use_notify
+  subdir('notification')
+endif
+
+if enable_grilo
+  subdir('grilo')
+endif
+
+if use_gudev
+  subdir('android')
+endif
diff --git a/plugins/mmkeys/meson.build b/plugins/mmkeys/meson.build
new file mode 100644
index 000000000..1162d022a
--- /dev/null
+++ b/plugins/mmkeys/meson.build
@@ -0,0 +1,19 @@
+mmkeys_plugin_dir = plugindir + '/mmkeys'
+
+mmkeys_sources = [
+  'rb-mmkeys-plugin.c']
+
+shared_module('mmkeys',
+  mmkeys_sources,
+  dependencies: [rhythmbox_core_dep],
+  c_args: ['-DHAVE_CONFIG_H'],
+  include_directories: pluginsinc,
+  install: true,
+  install_dir: mmkeys_plugin_dir)
+
+mmkeys_plugin_descriptor = custom_target('mmkeys-plugin-descriptor',
+  input: 'mmkeys.plugin.in',
+  output: 'mmkeys.plugin',
+  command: [intltool_merge, '--quiet', '--desktop-style', meson.source_root() + '/po', '@INPUT@', 
'@OUTPUT@'],
+  install: true,
+  install_dir: mmkeys_plugin_dir)
diff --git a/plugins/mpris/meson.build b/plugins/mpris/meson.build
new file mode 100644
index 000000000..828164ce8
--- /dev/null
+++ b/plugins/mpris/meson.build
@@ -0,0 +1,27 @@
+mpris_plugin_dir = plugindir + '/mpris'
+
+mpris_sources = [
+  'rb-mpris-plugin.c']
+
+mpris_c_args = [
+  '-DGNOMELOCALEDIR="@0@"'.format(datadir / 'locale'),
+  '-DG_LOG_DOMAIN="Rhythmbox"',
+  '-DPIXMAP_DIR="@0@"'.format(datadir / 'pixmaps'),
+  '-DSHARE_DIR="@0@"'.format(datadir),
+  '-DDATADIR="@0@"'.format(pkgdatadir),
+]
+
+shared_module('mpris',
+  mpris_sources,
+  dependencies: [rhythmbox_core_dep],
+  c_args: mpris_c_args,
+  include_directories: pluginsinc,
+  install: true,
+  install_dir: mpris_plugin_dir)
+
+mpris_plugin_descriptor = custom_target('mpris-plugin-descriptor',
+  input: 'mpris.plugin.in',
+  output: 'mpris.plugin',
+  command: [intltool_merge, '--quiet', '--desktop-style', meson.source_root() + '/po', '@INPUT@', 
'@OUTPUT@'],
+  install: true,
+  install_dir: mpris_plugin_dir)
diff --git a/plugins/mtpdevice/meson.build b/plugins/mtpdevice/meson.build
new file mode 100644
index 000000000..b7a244aa2
--- /dev/null
+++ b/plugins/mtpdevice/meson.build
@@ -0,0 +1,36 @@
+mtpdevice_plugin_dir = plugindir + '/mtpdevice'
+mtpdevice_plugin_data_dir = plugindatadir + '/mtpdevice'
+
+mtpdevice_resources = gnome.compile_resources('mtpdevice-resources',
+  'mtpdevice.gresource.xml',
+  source_dir: meson.current_source_dir())
+
+mtpdevice_sources = [
+  mtpdevice_resources,
+  'rb-mtp-plugin.c',
+  'rb-mtp-gst.c',
+  'rb-mtp-gst-src.c',
+  'rb-mtp-source.c',
+  'rb-mtp-thread.c',
+]
+
+mtpdevice_dependencies = [rhythmbox_core_dep, libmtp]
+if use_gudev
+  mtpdevice_dependencies += gudev
+else
+  mtpdevice_dependencies += hal
+endif
+
+shared_module('mtpdevice',
+  mtpdevice_sources,
+  c_args: ['-DHAVE_CONFIG_H'],
+  dependencies: mtpdevice_dependencies,
+  install: true,
+  install_dir: mtpdevice_plugin_dir)
+
+mtpdevice_plugin_descriptor = custom_target('mtpdevice-plugin-descriptor',
+  input: 'mtpdevice.plugin.in',
+  output: 'mtpdevice.plugin',
+  command: [intltool_merge, '--quiet', '--desktop-style', meson.source_root() + '/po', '@INPUT@', 
'@OUTPUT@'],
+  install: true,
+  install_dir: mtpdevice_plugin_dir)
diff --git a/plugins/notification/meson.build b/plugins/notification/meson.build
new file mode 100644
index 000000000..391d363be
--- /dev/null
+++ b/plugins/notification/meson.build
@@ -0,0 +1,19 @@
+notification_plugin_dir = plugindir + '/notification'
+
+notification_sources = [
+  'rb-notification-plugin.c']
+
+shared_module('notification',
+  notification_sources,
+  dependencies: [rhythmbox_core_dep, libnotify],
+  c_args: ['-DHAVE_CONFIG_H'],
+  include_directories: pluginsinc,
+  install: true,
+  install_dir: notification_plugin_dir)
+
+notification_plugin_descriptor = custom_target('notification-plugin-descriptor',
+  input: 'notification.plugin.in',
+  output: 'notification.plugin',
+  command: [intltool_merge, '--quiet', '--desktop-style', meson.source_root() + '/po', '@INPUT@', 
'@OUTPUT@'],
+  install: true,
+  install_dir: notification_plugin_dir)
diff --git a/plugins/power-manager/meson.build b/plugins/power-manager/meson.build
new file mode 100644
index 000000000..81b19ab2f
--- /dev/null
+++ b/plugins/power-manager/meson.build
@@ -0,0 +1,20 @@
+power_manager_plugin_dir = plugindir + '/power-manager'
+power_manager_plugin_data_dir = plugindatadir + '/power-manager'
+
+power_manager_sources = [
+  'rb-power-manager-plugin.c',
+]
+
+shared_module('power-manager',
+  power_manager_sources,
+  c_args: ['-DHAVE_CONFIG_H'],
+  dependencies: [rhythmbox_core_dep],
+  install: true,
+  install_dir: power_manager_plugin_dir)
+
+power_manager_plugin_descriptor = custom_target('power-manager-plugin-descriptor',
+  input: 'power-manager.plugin.in',
+  output: 'power-manager.plugin',
+  command: [intltool_merge, '--quiet', '--desktop-style', meson.source_root() + '/po', '@INPUT@', 
'@OUTPUT@'],
+  install: true,
+  install_dir: power_manager_plugin_dir)
diff --git a/plugins/pythonconsole/meson.build b/plugins/pythonconsole/meson.build
new file mode 100644
index 000000000..345faa774
--- /dev/null
+++ b/plugins/pythonconsole/meson.build
@@ -0,0 +1,14 @@
+pythonconsole_plugin_dir = plugindir + '/python-console'
+
+pythonconsole_plugin_files = [
+  'pythonconsole.py']
+
+install_data(pythonconsole_plugin_files,
+  install_dir: pythonconsole_plugin_dir)
+
+pythonconsole_plugin_descriptor = custom_target('pythonconsole-plugin-descriptor',
+  input: 'pythonconsole.plugin.in',
+  output: 'pythonconsole.plugin',
+  command: [intltool_merge, '--quiet', '--desktop-style', meson.source_root() + '/po', '@INPUT@', 
'@OUTPUT@'],
+  install: true,
+  install_dir: pythonconsole_plugin_dir)
diff --git a/plugins/rb/meson.build b/plugins/rb/meson.build
new file mode 100644
index 000000000..4f576c80f
--- /dev/null
+++ b/plugins/rb/meson.build
@@ -0,0 +1,18 @@
+rb_plugin_dir = plugindir + '/rb'
+
+rbconfig_py = configure_file(
+  input: 'rbconfig.py.in',
+  output: 'rbconfig.py',
+  install_dir: rb_plugin_dir,
+  configuration: cdata)
+
+rb_plugin_files = [
+  'Loader.py',
+  'Coroutine.py',
+  'URLCache.py',
+  'stringmatch.py',
+  'rb.py',
+  'rb.plugin']
+
+install_data(rb_plugin_files,
+  install_dir: rb_plugin_dir)
diff --git a/plugins/rbzeitgeist/meson.build b/plugins/rbzeitgeist/meson.build
new file mode 100644
index 000000000..4c26e6273
--- /dev/null
+++ b/plugins/rbzeitgeist/meson.build
@@ -0,0 +1,14 @@
+rbzeitgeist_plugin_dir = plugindir + '/rbzeitgeist'
+
+rbzeitgeist_plugin_files = [
+  'rbzeitgeist.py']
+
+install_data(rbzeitgeist_plugin_files,
+  install_dir: rbzeitgeist_plugin_dir)
+
+rbzeitgeist_plugin_descriptor = custom_target('rbzeitgeist-plugin-descriptor',
+  input: 'rbzeitgeist.plugin.in',
+  output: 'rbzeitgeist.plugin',
+  command: [intltool_merge, '--quiet', '--desktop-style', meson.source_root() + '/po', '@INPUT@', 
'@OUTPUT@'],
+  install: true,
+  install_dir: rbzeitgeist_plugin_dir)
diff --git a/plugins/replaygain/meson.build b/plugins/replaygain/meson.build
new file mode 100644
index 000000000..38b92f917
--- /dev/null
+++ b/plugins/replaygain/meson.build
@@ -0,0 +1,20 @@
+replaygain_plugin_dir = plugindir + '/replaygain'
+replaygain_plugin_data_dir = plugindatadir + '/replaygain'
+
+replaygain_plugin_files = [
+  'replaygain.py',
+  'player.py',
+  'config.py']
+
+install_data(replaygain_plugin_files,
+  install_dir: replaygain_plugin_dir)
+
+replaygain_plugin_descriptor = custom_target('replaygain-plugin-descriptor',
+  input: 'replaygain.plugin.in',
+  output: 'replaygain.plugin',
+  command: [intltool_merge, '--quiet', '--desktop-style', meson.source_root() + '/po', '@INPUT@', 
'@OUTPUT@'],
+  install: true,
+  install_dir: replaygain_plugin_dir)
+
+install_data('replaygain-prefs.ui',
+  install_dir: replaygain_plugin_data_dir)
diff --git a/plugins/soundcloud/meson.build b/plugins/soundcloud/meson.build
new file mode 100644
index 000000000..1e6e8df1f
--- /dev/null
+++ b/plugins/soundcloud/meson.build
@@ -0,0 +1,21 @@
+soundcloud_plugin_dir = plugindir + '/soundcloud'
+soundcloud_plugin_data_dir = plugindatadir + '/soundcloud'
+
+soundcloud_plugin_files = [
+  'soundcloud.py']
+
+install_data(soundcloud_plugin_files,
+  install_dir: soundcloud_plugin_dir)
+
+soundcloud_plugin_descriptor = custom_target('soundcloud-plugin-descriptor',
+  input: 'soundcloud.plugin.in',
+  output: 'soundcloud.plugin',
+  command: [intltool_merge, '--quiet', '--desktop-style', meson.source_root() + '/po', '@INPUT@', 
'@OUTPUT@'],
+  install: true,
+  install_dir: soundcloud_plugin_dir)
+
+install_data(['soundcloud.ui', 'powered-by-soundcloud.png'],
+  install_dir: soundcloud_plugin_data_dir)
+
+install_data(['icons/hicolor/scalable/places/soundcloud-symbolic.svg'],
+  install_dir: soundcloud_plugin_data_dir + '/icons/hicolor/scalable/places')
diff --git a/plugins/webremote/meson.build b/plugins/webremote/meson.build
new file mode 100644
index 000000000..532b5bfc6
--- /dev/null
+++ b/plugins/webremote/meson.build
@@ -0,0 +1,31 @@
+webremote_plugin_dir = plugindir + '/webremote'
+webremote_plugin_data_dir = plugindatadir + '/webremote'
+
+webremote_plugin_files = [
+  'webremote.py',
+  'siphash.py',]
+
+install_data(webremote_plugin_files,
+  install_dir: webremote_plugin_dir)
+
+webremote_plugin_descriptor = custom_target('webremote-plugin-descriptor',
+  input: 'webremote.plugin.in',
+  output: 'webremote.plugin',
+  command: [intltool_merge, '--quiet', '--desktop-style', meson.source_root() + '/po', '@INPUT@', 
'@OUTPUT@'],
+  install: true,
+  install_dir: webremote_plugin_dir)
+
+install_data([
+  'css/grids-responsive-min.css',
+  'css/pure-min.css',
+  'css/webremote.css'],
+  install_dir: webremote_plugin_data_dir + '/css')
+
+install_data('js/webremote.js',
+  install_dir: webremote_plugin_data_dir + '/js')
+
+install_data('webremote.html',
+  install_dir: webremote_plugin_data_dir)
+
+install_data('webremote-config.ui',
+  install_dir: webremote_plugin_data_dir)
diff --git a/po/meson.build b/po/meson.build
new file mode 100644
index 000000000..19bded903
--- /dev/null
+++ b/po/meson.build
@@ -0,0 +1,2 @@
+i18n = import('i18n')
+i18n.gettext('rhythmbox')
diff --git a/podcast/meson.build b/podcast/meson.build
new file mode 100644
index 000000000..765476c34
--- /dev/null
+++ b/podcast/meson.build
@@ -0,0 +1,66 @@
+podcast_headers = files(
+  'rb-podcast-entry-types.h',
+  'rb-podcast-parse.h',
+  'rb-podcast-manager.h',
+  'rb-podcast-search.h'
+)
+
+install_headers(podcast_headers, subdir: 'rhythmbox/podcast')
+
+podcast_parse_sources = files(
+  'rb-podcast-parse.c',
+  'rb-podcast-search.c',
+  'rb-podcast-search-itunes.c',
+)
+
+podcast_sources = files(
+  'rb-feed-podcast-properties-dialog.c',
+  'rb-podcast-add-dialog.c',
+  'rb-podcast-properties-dialog.c',
+  'rb-podcast-main-source.c',
+  'rb-podcast-search.c',
+  'rb-podcast-search-itunes.c',
+  'rb-podcast-source.c',
+  'rb-podcast-parse.c',
+  'rb-podcast-manager.c',
+  'rb-podcast-entry-types.c'
+)
+
+podcast_c_args = [
+  '-DGNOMELOCALEDIR="' + datadir + '/locale"',
+  '-DG_LOG_DOMAIN="RhythmBox"'
+]
+
+podcast_dependencies = [ json_glib, libsoup, totem_plparser ]
+
+rbpodcast_lib = static_library('rbpodcast', podcast_sources,
+  c_args: lib_c_args,
+  include_directories: [configinc, shellinc, sourcesinc, widgetsinc],
+  dependencies: [podcast_dependencies, librb_dep, rhythmdb_dep, rbmetadata_dep],
+  install: false,
+  link_args: ['-export-dynamic']
+)
+
+rbpodcast_dep = declare_dependency(
+  link_with: rbpodcast_lib,
+  dependencies: podcast_dependencies,
+  include_directories: [configinc, include_directories('.')],
+)
+
+##
+
+librbpodcast_parse = static_library('rbpodcast_parse', podcast_parse_sources,
+  c_args: c_args,
+  dependencies: [librb_dep, json_glib, libsoup, totem_plparser])
+
+test_podcast_search = executable('test-podcast-search',
+  'test-podcast-search.c',
+  c_args: c_args,
+  dependencies: [librb_dep, json_glib, totem_plparser],
+  link_with: [librbpodcast_parse])
+
+test_podcast_parse = executable('test-podcast-parse',
+  'test-podcast-parse.c',
+  c_args: c_args,
+  dependencies: [librb_dep, totem_plparser],
+  link_with: [librbpodcast_parse])
diff --git a/remote/dbus/meson.build b/remote/dbus/meson.build
new file mode 100644
index 000000000..5bd0d840e
--- /dev/null
+++ b/remote/dbus/meson.build
@@ -0,0 +1,16 @@
+client_c_args = [
+  '-DGNOMELOCALEDIR="' + datadir + '/locale"',
+  '-DG_LOG_DOMAIN="Rhythmbox"',
+  '-DPIXMAP_DIR="' + datadir + '/pixmaps"',
+  '-DSHARE_DIR="' + pkgdatadir + '"',
+  '-DDATADIR="' + datadir + '"',
+  '-D__EXTENSIONS__',
+]
+
+executable('rhythmbox-client',
+    'rb-client.c',
+    c_args: client_c_args,
+    dependencies: librb_dep,
+    install: true,
+    install_rpath: rpath
+)
diff --git a/remote/meson.build b/remote/meson.build
new file mode 100644
index 000000000..654a1011b
--- /dev/null
+++ b/remote/meson.build
@@ -0,0 +1 @@
+subdir('dbus')
diff --git a/rhythmdb/meson.build b/rhythmdb/meson.build
new file mode 100644
index 000000000..00d468451
--- /dev/null
+++ b/rhythmdb/meson.build
@@ -0,0 +1,59 @@
+rhythmdb_headers = files(
+  'rb-refstring.h',
+  'rhythmdb.h',
+  'rhythmdb-entry.h',
+  'rhythmdb-entry-type.h',
+  'rhythmdb-import-job.h',
+  'rhythmdb-metadata-cache.h',
+  'rhythmdb-property-model.h',
+  'rhythmdb-query-model.h',
+  'rhythmdb-query-result-list.h',
+  'rhythmdb-query-results.h',
+)
+
+install_headers(rhythmdb_headers, subdir: 'rhythmbox/rhythmdb')
+
+rhythmdb_sources = files(
+  'rb-refstring.c',
+  'rhythmdb.c',
+  'rhythmdb-dbus.c',
+  'rhythmdb-entry-type.c',
+  'rhythmdb-import-job.c',
+  'rhythmdb-metadata-cache.c',
+  'rhythmdb-monitor.c',
+  'rhythmdb-property-model.c',
+  'rhythmdb-query-model.c',
+  'rhythmdb-query-result-list.c',
+  'rhythmdb-query-results.c',
+  'rhythmdb-query.c',
+  'rhythmdb-song-entry-types.c',
+)
+
+if get_option('database') == 'tree'
+  rhythmdb_sources += files('rhythmdb-tree.c')
+endif
+
+c_args = [
+  '-DGNOMELOCALEDIR="' + datadir + '/locale"',
+  '-DG_LOG_DOMAIN="RhythmDB"',
+  '-DSHARE_DIR="' + pkgdatadir + '"',
+  '-DDATADIR="' + datadir + '"'
+]
+
+if use_no_strict_aliasing
+  c_args += ['-fno-strict-aliasing']
+endif
+
+rhythmdb_dependencies = [libmath]
+
+librhythmdb = static_library('rhythmdb', rhythmdb_sources,
+  c_args: c_args,
+  dependencies: [rhythmdb_dependencies, librb_dep],
+  include_directories: [podcastinc, widgetsinc],
+  link_args: '-export-dynamic')
+
+rhythmdb_dep = declare_dependency(
+  link_with: librhythmdb,
+  include_directories: include_directories('.'),
+  dependencies: rhythmdb_dependencies,
+)
diff --git a/sample-plugins/meson.build b/sample-plugins/meson.build
new file mode 100644
index 000000000..e6349f5aa
--- /dev/null
+++ b/sample-plugins/meson.build
@@ -0,0 +1,12 @@
+sampleplugindir = libdir / 'rhythmbox' / 'sample-plugins'
+sampleplugindatadir = datadir / 'rhythmbox' / 'sample-plugins'
+
+subdir('sample')
+
+if enable_python
+  subdir('sample-python')
+endif
+
+if enable_vala
+  subdir('sample-vala')
+endif
diff --git a/sample-plugins/sample-python/meson.build b/sample-plugins/sample-python/meson.build
new file mode 100644
index 000000000..a2aa954ce
--- /dev/null
+++ b/sample-plugins/sample-python/meson.build
@@ -0,0 +1,16 @@
+sample_python_plugin_dir = sampleplugindir + '/sample-python'
+sample_python_plugin_data_dir = sampleplugindatadir + '/sample-python'
+
+sample_python_plugin_files = [
+  'sample-python.py',
+]
+
+install_data(sample_python_plugin_files,
+  install_dir: sample_python_plugin_dir)
+
+sample_python_plugin_descriptor = custom_target('sample-python-plugin-descriptor',
+  input: 'sample-python.plugin.in',
+  output: 'sample-python.plugin',
+  command: [intltool_merge, '--quiet', '--desktop-style', meson.source_root() + '/po', '@INPUT@', 
'@OUTPUT@'],
+  install: true,
+  install_dir: sample_python_plugin_dir)
diff --git a/sample-plugins/sample-vala/meson.build b/sample-plugins/sample-vala/meson.build
new file mode 100644
index 000000000..1f54ec24d
--- /dev/null
+++ b/sample-plugins/sample-vala/meson.build
@@ -0,0 +1,29 @@
+sample_vala_plugin_dir = sampleplugindir + '/sample-vala'
+
+sample_vala_sources = [
+  'rb-sample-vala-plugin.vala'
+]
+
+vala_deps = [
+  dependency('glib-2.0'),
+  dependency('gobject-2.0'),
+  meson.get_compiler('vala').find_library('rhythmdb', dirs: vapi_dir),
+  meson.get_compiler('vala').find_library('rb', dirs: vapi_dir),
+  dependency('gtk+-3.0'),
+  dependency('gstreamer-1.0'),
+  dependency('libpeas-1.0')
+]
+
+shared_module('sample-vala',
+  sample_vala_sources,
+  c_args: ['-DHAVE_CONFIG_H'],
+  dependencies: vala_deps,
+  install_dir: sample_vala_plugin_dir,
+  install: true)
+
+sample_vala_plugin_descriptor = custom_target('sample-vala-plugin-descriptor',
+  input: 'sample-vala.plugin.in',
+  output: 'sample-vala.plugin',
+  command: [intltool_merge, '--quiet', '--desktop-style', meson.source_root() + '/po', '@INPUT@', 
'@OUTPUT@'],
+  install: true,
+  install_dir: sample_vala_plugin_dir)
diff --git a/sample-plugins/sample/meson.build b/sample-plugins/sample/meson.build
new file mode 100644
index 000000000..be8a65fc9
--- /dev/null
+++ b/sample-plugins/sample/meson.build
@@ -0,0 +1,19 @@
+sample_plugin_dir = sampleplugindir + '/sample'
+
+sample_sources = [
+  'rb-sample-plugin.c'
+]
+
+shared_module('sample',
+  sample_sources,
+  c_args: ['-DHAVE_CONFIG_H'],
+  dependencies: [rhythmbox_core_dep],
+  install_dir: sample_plugin_dir,
+  install: true)
+
+sample_plugin_descriptor = custom_target('sample-plugin-descriptor',
+  input: 'sample.plugin.in',
+  output: 'sample.plugin',
+  command: [intltool_merge, '--quiet', '--desktop-style', meson.source_root() + '/po', '@INPUT@', 
'@OUTPUT@'],
+  install: true,
+  install_dir: sample_plugin_dir)
diff --git a/shell/meson.build b/shell/meson.build
new file mode 100644
index 000000000..8d80febbb
--- /dev/null
+++ b/shell/meson.build
@@ -0,0 +1,152 @@
+gnome = import('gnome')
+
+make_tab_command = ['sed', '-e', 's/^/"/', '-e', 's/$/",/', '@INPUT@']
+
+authors_tab = custom_target('AUTHORS.tab',
+  input: '../AUTHORS', output: 'AUTHORS.tab',
+  command: make_tab_command, capture: true
+)
+
+maintainers_tab = custom_target('MAINTAINERS.tab',
+  input: '../MAINTAINERS', output: 'MAINTAINERS.tab',
+  command: make_tab_command, capture: true
+)
+
+maintainers_old_tab = custom_target('MAINTAINERS.old.tab',
+  input: '../MAINTAINERS.old', output: 'MAINTAINERS.old.tab',
+  command: make_tab_command, capture: true
+)
+
+documenters_tab = custom_target('DOCUMENTERS.tab',
+  input: '../DOCUMENTERS', output: 'DOCUMENTERS.tab',
+  command: make_tab_command, capture: true
+)
+
+shell_headers = files(
+  'rb-shell.h',
+  'rb-shell-player.h',
+  'rb-shell-preferences.h',
+  'rb-playlist-manager.h',
+  'rb-removable-media-manager.h',
+  'rb-history.h',
+  'rb-play-order.h',
+  'rb-track-transfer-batch.h',
+  'rb-track-transfer-queue.h'
+)
+
+install_headers(shell_headers, subdir: 'rhythmbox/shell')
+
+resources = gnome.compile_resources('rb-resources', 'rhythmbox.gresource.xml',
+  source_dir: ['../data/'],
+  dependencies: playlists_xml)
+
+shell_sources = files(
+  'rb-application.c',
+  'rb-history.c',
+  'rb-play-order.c',
+  'rb-play-order-linear.c',
+  'rb-play-order-linear-loop.c',
+  'rb-play-order-queue.c',
+  'rb-play-order-random.c',
+  'rb-play-order-random-by-age.c',
+  'rb-play-order-random-by-age-and-rating.c',
+  'rb-play-order-random-by-rating.c',
+  'rb-play-order-random-equal-weights.c',
+  'rb-play-order-shuffle.c',
+  'rb-playlist-manager.c',
+  'rb-removable-media-manager.c',
+  'rb-shell.c',
+  'rb-shell-clipboard.c',
+  'rb-shell-player.c',
+  'rb-shell-preferences.c',
+  'rb-task-list.c',
+  'rb-track-transfer-batch.c',
+  'rb-track-transfer-queue.c',
+) + [
+  resources,
+  authors_tab,
+  documenters_tab,
+  maintainers_tab,
+  maintainers_old_tab,
+]
+
+shell_c_args = [
+  '-DGNOMELOCALEDIR="' + datadir + '/locale"',
+  '-DG_LOG_DOMAIN="Rhythmbox"',
+  '-DPIXMAP_DIR="' + datadir + '/pixmaps"',
+  '-DSHARE_DIR="' + pkgdatadir + '"',
+  '-DDATADIR="' + datadir + '"',
+  '-DLIBDIR="' + libdir + '"',
+  '-D__EXTENSIONS__',
+]
+
+rhythmbox_core_dependencies = [gobject_introspection, libpeas]
+
+rhythmbox_core_include_directories = [
+  configinc, libinc, mpidinc, metadatainc, rhythmdbinc, backendsinc, pluginsinc,
+  podcastinc, sourcesinc, sourcessyncinc, widgetsinc, include_directories('.'),
+]
+
+librhythmbox_core = shared_library('rhythmbox-core',
+  shell_sources,
+  c_args: shell_c_args,
+  include_directories: rhythmbox_core_include_directories,
+  dependencies: [rhythmbox_core_dependencies,  mediaplayerid_dep, rhythmdb_dep,
+    rbbackends_dep, rbpodcast_dep, rbwidgets_dep, sources_dep],
+  install: 'true',
+  link_args: ['-export-dynamic'],
+  link_whole: [librb, rbwidgets_lib, sources_lib],
+  version: '@0@.@1@.@2@'.format(RHYTHMBOX_CORE_CURRENT, RHYTHMBOX_CORE_REVISION, RHYTHMBOX_CORE_AGE)
+)
+
+# We can't use the _dep objects from the helper libraries here
+# as we need to avoid linking the static helper libraries to the
+# plugins.
+rhythmbox_core_dep = declare_dependency(
+  link_with: librhythmbox_core,
+  dependencies: [mpid_dependencies, lib_dependencies, rhythmdb_dependencies,
+    gstreamer_backend_dependencies, backends_dependencies,
+    podcast_dependencies, widgets_dependencies, sources_dependencies],
+  include_directories: rhythmbox_core_include_directories,
+)
+
+rb_gir = gnome.generate_gir(librhythmbox_core,
+  dependencies: [rhythmbox_core_dependencies],
+  link_with: [],
+  extra_args: [ '--accept-unprefixed'],
+  sources: lib_headers + lib_sources + 
+    backends_sources + backends_headers +
+    gstreamer_backend_sources + gstreamer_backend_headers +
+    metadata_sources + metadata_headers +
+    podcast_sources + podcast_headers +
+    rhythmdb_sources + rhythmdb_headers +
+    shell_sources + shell_headers +
+    sources_sources + sources_headers +
+    widgets_sources + widgets_headers,
+  namespace: 'RB',
+  nsversion: '3.0',
+  identifier_prefix: 'RB',
+  symbol_prefix: 'rb_',
+  includes: ['GObject-2.0', 'Gio-2.0', 'Gtk-3.0', 'Gst-1.0',
+    'GstPbutils-1.0', 'libxml2-2.0', mpid_gir[0]],
+  install: true,
+)
+
+rhythmbox_dependencies = [rhythmbox_core_dep, gobject_introspection,
+  gio, gio_unix, libsoup, tdb, json_glib]
+
+if gdk_targets.contains('x11')
+  rhythmbox_dependencies += [x11]
+endif
+
+if enable_python
+  rhythmbox_dependencies += [pygobject]
+endif
+
+executable('rhythmbox', 'main.c',
+  dependencies: rhythmbox_dependencies,
+  include_directories: [ pluginsinc ],
+  link_args: ['-export-dynamic'],
+  install: true,
+  install_rpath: rpath
+)
diff --git a/sources/meson.build b/sources/meson.build
new file mode 100644
index 000000000..b1e26b031
--- /dev/null
+++ b/sources/meson.build
@@ -0,0 +1,75 @@
+subdir('sync')
+
+sources_headers = files(
+  'rb-auto-playlist-source.h',
+  'rb-browser-source.h',
+  'rb-device-source.h',
+  'rb-display-page-group.h',
+  'rb-display-page-menu.h',
+  'rb-display-page-model.h',
+  'rb-display-page-tree.h',
+  'rb-display-page.h',
+  'rb-media-player-source.h',
+  'rb-playlist-source.h',
+  'rb-playlist-xml.h',
+  'rb-source-search-basic.h',
+  'rb-source-search.h',
+  'rb-source.h',
+  'rb-static-playlist-source.h',
+  'rb-streaming-source.h',
+  'rb-transfer-target.h'
+)
+
+install_headers(sources_headers, subdir: 'rhythmbox/sources')
+
+sources_sources = files(
+  'rb-auto-playlist-source.c',
+  'rb-browser-source.c',
+  'rb-device-source.c',
+  'rb-display-page-group.c',
+  'rb-display-page-menu.c',
+  'rb-display-page-model.c',
+  'rb-display-page-tree.c',
+  'rb-display-page.c',
+  'rb-import-errors-source.c',
+  'rb-library-source.c',
+  'rb-media-player-source.c',
+  'rb-missing-files-source.c',
+  'rb-play-queue-source.c',
+  'rb-playlist-source.c',
+  'rb-source-search-basic.c',
+  'rb-source-search.c',
+  'rb-source.c',
+  'rb-static-playlist-source.c',
+  'rb-streaming-source.c',
+  'rb-transfer-target.c'
+)
+
+sources_c_args = [
+  '-DGNOMELOCALEDIR="' + datadir + '/locale"',
+  '-DG_LOG_DOMAIN="Rhythmbox"',
+  '-DPIXMAP_DIR="' + datadir + '/pixmaps"',
+  '-DSHARE_DIR="' + pkgdatadir + '"',
+  '-DDATADIR="' + datadir + '"',
+]
+
+if use_no_strict_aliasing
+  sources_c_args += ['-fno-strict-aliasing']
+endif
+
+sources_dependencies = [totem_plparser, gstreamer_pbutils, gtk]
+
+sources_lib = static_library('sources', sources_sources,
+  c_args: sources_c_args,
+  include_directories: [configinc, shellinc, sourcesinc, widgetsinc],
+  dependencies: sources_dependencies + [librb_dep, rhythmdb_dep,
+    rbbackends_dep, rbmetadata_dep, sourcesync_dep],
+  install: false,
+  link_args: ['-export-dynamic']
+)
+
+sources_dep = declare_dependency(
+  link_with: sources_lib,
+  dependencies: sources_dependencies,
+  include_directories: include_directories('.'),
+)
diff --git a/sources/sync/meson.build b/sources/sync/meson.build
new file mode 100644
index 000000000..fd81a85d7
--- /dev/null
+++ b/sources/sync/meson.build
@@ -0,0 +1,34 @@
+sourcesync_sources = files(
+  'rb-sync-settings.c',
+  'rb-sync-settings-ui.c',
+  'rb-sync-state.c',
+  'rb-sync-state-ui.c',
+)
+
+sourcesync_c_args = [
+  '-DGNOMELOCALEDIR="' + datadir + '/locale"',
+  '-DG_LOG_DOMAIN="Rhythmbox"',
+  '-DPIXMAP_DIR="' + datadir + '/pixmaps"',
+  '-DSHARE_DIR="' + pkgdatadir + '"',
+  '-DDATADIR="' + datadir + '"',
+]
+
+if use_no_strict_aliasing
+  sourcesync_c_args += ['-fno-strict-aliasing']
+endif
+
+sourcesync_dependencies = [librb_dep, rbpodcast_dep, rhythmdb_dep]
+
+sourcesync_lib = static_library('sourcesync', sourcesync_sources,
+  c_args: sourcesync_c_args,
+  include_directories: [configinc, shellinc, sourcesinc, widgetsinc],
+  dependencies: sourcesync_dependencies,
+  install: false,
+  link_args: ['-export-dynamic']
+)
+
+sourcesync_dep = declare_dependency(
+  link_with: sourcesync_lib,
+  dependencies: sourcesync_dependencies,
+  include_directories: [include_directories('.')],
+)
diff --git a/tests/meson.build b/tests/meson.build
new file mode 100644
index 000000000..edb0f61d4
--- /dev/null
+++ b/tests/meson.build
@@ -0,0 +1,46 @@
+check = dependency('check', required: false)
+
+if check.found()
+  test('test-rhythmdb',
+    executable('test-rhythmdb',
+      ['test-rhythmdb.c', 'test-utils.c'],
+      dependencies: [rhythmbox_core_dep, check]))
+
+  test('test-rhythmdb-query-model',
+    executable('test-rhythmdb-query-model',
+      ['test-rhythmdb-query-model.c', 'test-utils.c'],
+      dependencies: [rhythmbox_core_dep, check]))
+
+  test('test-rhythmdb-property-model',
+    executable('test-rhythmdb-property-model',
+      ['test-rhythmdb-property-model.c', 'test-utils.c'],
+      dependencies: [rhythmbox_core_dep, check]))
+
+  test('test-file-helpers',
+    executable('test-file-helpers',
+      ['test-file-helpers.c', 'test-utils.c'],
+      dependencies: [rhythmbox_core_dep, check]))
+
+  test('test-rb-lib',
+    executable('test-rb-lib',
+      ['test-rb-lib.c', 'test-utils.c'],
+      dependencies: [rhythmbox_core_dep, check]))
+
+  test('test-audioscrobbler',
+    executable('test-audioscrobbler',
+      ['test-audioscrobbler.c', 'test-utils.c'],
+      dependencies: [rhythmbox_core_dep, audioscrobbler_test_dep, check]))
+
+  test_widgets_resources = gnome.compile_resources('test-widgets-resources', 'test-widgets.gresource.xml',
+    source_dir: ['../data'])
+  test('test-widgets',
+    executable('test-widgets',
+      ['test-widgets.c', 'test-utils.c', test_widgets_resources],
+      dependencies: [rhythmbox_core_dep, check]))
+
+  executable('bench-rhythmdb-load',
+    'bench-rhythmdb-load.c',
+    dependencies: [rhythmbox_core_dep])
+else
+  message('Please install `check` so that unit tests can be executed.')
+endif
diff --git a/widgets/meson.build b/widgets/meson.build
new file mode 100644
index 000000000..e4b4c5179
--- /dev/null
+++ b/widgets/meson.build
@@ -0,0 +1,81 @@
+widgets_headers = files(
+  'nautilus-floating-bar.h',
+  'rb-alert-dialog.h',
+  'rb-button-bar.h',
+  'rb-cell-renderer-pixbuf.h',
+  'rb-cell-renderer-rating.h',
+  'rb-dialog.h',
+  'rb-encoding-settings.h',
+  'rb-entry-view.h',
+  'rb-fading-image.h',
+  'rb-import-dialog.h',
+  'rb-library-browser.h',
+  'rb-object-property-editor.h',
+  'rb-property-view.h',
+  'rb-rating.h',
+  'rb-segmented-bar.h',
+  'rb-song-info.h',
+  'rb-source-toolbar.h',
+  'rb-task-list-display.h',
+  'rb-uri-dialog.h',
+)
+
+install_headers(widgets_headers, subdir: 'rhythmbox/widgets')
+
+widgets_sources = files(
+  'eggwrapbox-enums.c',
+  'eggwrapbox.c',
+  'gossip-cell-renderer-expander.c',
+  'nautilus-floating-bar.c',
+  'rb-alert-dialog.c',
+  'rb-button-bar.c',
+  'rb-cell-renderer-pixbuf.c',
+  'rb-cell-renderer-rating.c',
+  'rb-dialog.c',
+  'rb-encoding-settings.c',
+  'rb-entry-view.c',
+  'rb-fading-image.c',
+  'rb-header.c',
+  'rb-import-dialog.c',
+  'rb-library-browser.c',
+  'rb-object-property-editor.c',
+  'rb-property-view.c',
+  'rb-query-creator-properties.c',
+  'rb-query-creator.c',
+  'rb-rating-helper.c',
+  'rb-rating.c',
+  'rb-search-entry.c',
+  'rb-segmented-bar.c',
+  'rb-song-info.c',
+  'rb-source-toolbar.c',
+  'rb-task-list-display.c',
+  'rb-uri-dialog.c',
+)
+
+
+widgets_c_args = [
+  '-DGNOMELOCALEDIR="' + datadir + '/locale"',
+  '-DG_LOG_DOMAIN="Rhythmbox"',
+]
+
+widgets_dependencies = [libnotify, gtk]
+
+rbwidgets_lib = static_library('rbwidgets',
+  widgets_sources,
+  dependencies: widgets_dependencies + [librb_dep, rhythmdb_dep, rbmetadata_dep,
+  rbbackends_dep, rbpodcast_dep, sources_dep],
+  include_directories: [pluginsinc, shellinc, sourcessyncinc, widgetsinc],
+  link_args: ['-export-dynamic'])
+
+rbwidgets_dep = declare_dependency(
+  link_with: rbwidgets_lib,
+  dependencies: widgets_dependencies,
+  include_directories: include_directories('.'),
+)
+
+# These are interactive UI tests.
+test_rb_segmented_bar = executable('test-rb-segmented-bar', 'test-rb-segmented-bar.c',
+  dependencies: [rbwidgets_dep, librb_dep])
+
+test_uri_dialog = executable('test-uri-dialog', 'test-uri-dialog.c',
+  dependencies: [rbwidgets_dep, librb_dep])


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]