[rhythmbox/wip/sam/meson: 1/2] Meson build instructions




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

    Meson build instructions
    
    See <http://www.mesonbuild.com/> for more information about Meson.

 .gitignore                                |   1 +
 backends/gstreamer/meson.build            |  32 +++
 backends/meson.build                      |  39 +++
 config.h.meson                            | 138 +++++++++
 data/meson.build                          |  21 ++
 lib/libmediaplayerid/meson.build          |  50 ++++
 lib/meson.build                           |  64 +++++
 meson.build                               | 463 ++++++++++++++++++++++++++++++
 meson_options.txt                         |  39 +++
 metadata/meson.build                      |  70 +++++
 plugins/android/meson.build               |  25 ++
 plugins/artsearch/meson.build             |  20 ++
 plugins/audiocd/meson.build               |  33 +++
 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                  |  22 ++
 plugins/lyrics/meson.build                |  28 ++
 plugins/magnatune/meson.build             |  30 ++
 plugins/meson.build                       |  64 +++++
 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                            |  86 ++++++
 podcast/meson.build                       |  71 +++++
 remote/dbus/meson.build                   |  16 ++
 remote/meson.build                        |   1 +
 rhythmdb/meson.build                      |  58 ++++
 shell/meson.build                         | 154 ++++++++++
 sources/meson.build                       |  75 +++++
 sources/sync/meson.build                  |  34 +++
 tests/meson.build                         |  46 +++
 widgets/meson.build                       |  81 ++++++
 49 files changed, 2325 insertions(+)
---
diff --git a/.gitignore b/.gitignore
index f140a3e35..9559b830c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -18,6 +18,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..696b490c8
--- /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]
+
+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/config.h.meson b/config.h.meson
new file mode 100644
index 000000000..dd859fcc1
--- /dev/null
+++ b/config.h.meson
@@ -0,0 +1,138 @@
+/* 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 if you have HAL support */
+#mesondefine HAVE_HAL
+
+/* 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
+
+/* path to metadata build dir */
+#mesondefine METADATA_UNINSTALLED_DIR
+
+/* 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/meson.build b/data/meson.build
new file mode 100644
index 000000000..f441f5f36
--- /dev/null
+++ b/data/meson.build
@@ -0,0 +1,21 @@
+desktop_in_files = [ 'rhythmbox.desktop.in', 'rhythmbox-device.desktop.in' ]
+foreach desktop_in_file : desktop_in_files
+  configure_file(
+    input: desktop_in_file + '.in',
+    output: desktop_in_file,
+    configuration: cdata
+  )
+endforeach
+
+# 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')
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..0c2e82f85
--- /dev/null
+++ b/lib/meson.build
@@ -0,0 +1,64 @@
+subdir('libmediaplayerid')
+
+lib_headers = files(
+  'rb-async-copy.h',
+  'rb-builder-helpers.h',
+  'rb-chunk-loader.h',
+  'rb-debug.h',
+  'rb-file-helpers.h',
+  'rb-gst-media-types.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="' + datadir + '"',
+  '-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..b63e2330c
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,463 @@
+#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')
+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') != 'no'
+  gudev = dependency('gudev-1.0', version: '>= 143', required: false)
+  if gudev.found()
+    use_gudev = true
+    cdata.set('HAVE_GUDEV', 1)
+  elif get_option('gudev') == 'yes'
+    error('GUdev explicitly requested, but is not available')
+  endif
+endif
+
+use_hal = false
+if get_option('hal') != 'no'
+  hal = dependency('hal', version: '>= 0.5 < 0.6', required: false)
+  dbus_glib = dependency('dbus-glib-1', required: false)
+  if hal.found() and dbus_glib.found()
+    cdata.set('HAVE_HAL', 1)
+    use_hal = true
+  elif get_option('hal') == 'yes'
+    error('HAL explicitly requested, but is not available')
+  endif
+endif
+
+use_ipod = false
+if get_option('ipod') != 'no'
+  libgpod = dependency('libgpod-1.0', version: '>= 0.6', required: false)
+  if libgpod.found()
+    use_ipod = true
+    cdata.set('HAVE_ITDB_START_STOP_SYNC', libgpod.version() >= '0.7.92')
+  elif get_option('ipod') == 'yes'
+    error('iPod explicitly requested but libgpod couldn\'t be found')
+  endif
+endif
+
+use_mtp = false
+if get_option('mtp') != 'no'
+  libmtp = dependency('libmtp', version: '>= 0.3.0', required: false)
+
+  if libmtp.found()
+    if use_gudev or use_hal
+      use_mtp = true
+    else
+      error('MTP explicitly requested but GUdev and HAL are not available')
+    endif
+  elif get_option('mtp') == 'yes'
+    error('MTP explicitly requested but libmtp is not available')
+  endif
+endif
+
+use_notify = false
+if get_option('libnotify') != 'no'
+  libnotify = dependency('libnotify', version: '>= 0.7.0', required: false)
+
+  if libnotify.found()
+    use_notify = true
+    # In configure.ac the version of libnotify is passed to the C compiler
+    # like -DLIBNOTIFY_VERSION_MAJOR=... but nothing seems to actually use
+    # that, so I've not implemented that in the Meson build system.
+  elif get_option('libnotify') == 'yes'
+    error('libnotify support explicitly requested, but libnotify couldn\'t be found')
+  endif
+endif
+
+use_libsecret = false
+if get_option('libsecret') != 'no'
+  libsecret = dependency('libsecret-1', version: '>= 0.18', required: false)
+
+  if libsecret.found()
+    use_libsecret = true
+    cdata.set('PY_LIBSECRET_ENABLED', true)
+  elif get_option('libsecret') == 'yes'
+    error('keyring support explicitly requested but libsecret could not be found')
+  endif
+endif
+
+use_lirc = false
+if get_option('lirc') != 'no'
+  lirc = dependency('lirc', required: false)
+
+  if lirc.found()
+    use_lirc = true
+  elif get_option('lirc') == 'yes'
+    error('lirc explicitly requested but no support found')
+  endif
+endif
+
+enable_mmkeys = false
+if get_option('mmkeys') != 'no'
+  if cc.has_header('X11/XF86keysym.h')
+    enable_mmkeys = true
+  elif get_option('mmkeys') == 'yes'
+    error('Multimedia keys explicitly requested but no support found')
+  endif
+endif
+
+have_libbrasero_media = false
+if get_option('brasero') != 'no'
+  brasero_media = dependency('libbrasero-media3', version: '>= 2.31.5', required: false)
+
+  if brasero_media.found()
+    cdata.set('HAVE_LIBBRASERO_MEDIA', 1)
+    have_libbrasero_media = true
+  elif get_option('brasero') == 'yes'
+    error('CD burning support explicitly requested but libbrasero-media could not be found')
+  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('USE_UNINSTALLED_DIRS', get_option('uninstalled-build'))
+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')
+
+set_more_warnings = false
+if get_option('more-warnings') == 'yes'
+  set_more_warnings = true
+elif get_option('more-warnings') == 'auto'
+  if run_command('[', '-d', '.git', ']').returncode() == 0
+    set_more_warnings = true
+  endif
+endif
+
+if set_more_warnings == true and cc.get_id() == 'gcc'
+  warning_flags = [
+    '-Wcomment', '-Wformat', '-Wnonnull', '-Wimplicit-int', '-Wimplicit',
+    '-Wmain', '-Wmissing-braces', '-Wparentheses', '-Wsequence-point',
+    '-Wreturn-type', '-Wswitch', '-Wtrigraphs', '-Wunused-function',
+    '-Wunused-label', '-Wunused-value', '-Wchar-subscripts',
+    '-Wmissing-declarations', '-Wmissing-prototypes', '-Wnested-externs',
+    '-Wpointer-arith', '-Wcast-align', '-Wformat-security', '-Wall',
+    '-Wno-deprecated-declarations']
+
+  # in configure.ac this option is only added if '-O0' is not present in the CFLAGS
+  # I'm not sure how to do it in Meson and not sure if it matters; the configure.ac
+  # stuff dates from 2005 in commit 8a76a0a72abad7ae24b895910d93791b90dfe005.
+  warning_flags += ['-Wuninitialized']
+
+  foreach option : warning_flags
+    add_global_arguments(option, language: 'c')
+    # In configure.ac we would check if each compiler argument was actually
+    # supported by the compiler. That's quite slow and here we just assume
+    # they all are. If this causes problems, `if cc.has_argument(option)` is
+    # the way to implement such a check here.
+  endforeach
+endif
+
+use_no_strict_aliasing = cc.has_argument('-fno-strict-aliasing')
+
+datadir = get_option('prefix') / get_option('datadir')
+libdir = get_option('prefix') / get_option('libdir')
+
+#################
+# 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('python-plugins') != 'no'
+  python = find_program('python3')
+  if not python.found() and get_option('python-plugins') == 'yes'
+    error('Python support explicitly requested, but no suitable Python interpreter could be found')
+  endif
+
+  pygobject = dependency('pygobject-3.0', version: '>= 3.0.0')
+  if not pygobject.found() and get_option('python-plugins') == 'yes'
+    error('Python support explicitly requested, but pygobject-3.0 could not be found')
+  endif
+
+  pyoverridesdir = run_command([python, '-c', '''import gi; print(gi._overridesdir)''']).stdout().strip()
+  enable_python = true
+endif
+
+enable_vala = false
+if get_option('vala-plugins') != 'no'
+  vala_found = add_languages('vala', required: false)
+
+  if not vala_found and get_option('vala-plugins') == 'yes'
+    error('Vala plugin support explicitly requested, but not found')
+  endif
+
+  enable_vala = true
+endif
+
+##########
+# Plugins
+
+enable_fm_radio = false
+if get_option('fm-radio') != 'no'
+  if cc.has_header('linux/videodev2.h')
+    enable_fm_radio = true
+  elif get_option('fm-radio') == 'yes'
+    error('FM radio plugin explicitly requested, but cannot be built')
+  endif
+endif
+
+enable_browser_plugin = false
+if get_option('browser-plugin')
+  # This is configurable with configure.ac by setting MOZILLA_PLUGINDIR in the
+  # environment. Here it's hardcoded, mainly because Meson doesn't yet support
+  # reading environment vars: https://github.com/mesonbuild/meson/issues/9
+  mozilla_plugindir = get_option('libdir') + '/mozilla/plugins'
+
+  cdata.set('ITMS_HANDLER', 'x-scheme-handler/itms;x-scheme-handler/itmss;')
+endif
+
+have_libdmapsharing = false
+if get_option('daap') != 'no'
+  libdmapsharing = dependency('libdmapsharing-3.0', version: '>= 2.9.19', required: false)
+
+  if libdmapsharing.found()
+    cdata.set('HAVE_LIBDMAPSHARING', 1)
+    have_libdmapsharing = true
+  elif get_option('brasero') == 'yes'
+    error('DAAP support explicitly requested, but libdmapsharing couldn\'t be found')
+  endif
+endif
+
+if get_option('grilo') != 'no'
+  grilo = dependency('grilo-0.3', version: '>= 0.3.0', required: false)
+
+  if grilo.found()
+    enable_grilo = true
+    cdata.set('HAVE_GRILO', 1)
+  elif get_option('grilo') == 'yes'
+    error('Grilo support explicitly requested, but grilo could not be found')
+  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')
+elif use_hal
+  message('** HAL 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
+
+if enable_browser_plugin
+  message('** iTunes detection browser plugin (for podcasts) enabled')
+else
+  message('   iTunes detection browser plugin (for podcasts) 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')
+subdir('remote')
+
+subdir('bindings')
+subdir('tests')
+subdir('po')
+
+
+# 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..eb69e8c95
--- /dev/null
+++ b/meson_options.txt
@@ -0,0 +1,39 @@
+option('brasero', type: 'combo', choices: ['yes', 'no', 'auto'], value: 'auto',
+       description: 'Enable disc burning support using libbrasero-media')
+option('browser-plugin', type: 'boolean', value: true,
+       description: 'iTunes detection browser plugin, for Firefox')
+option('daap', type: 'combo', choices: ['yes', 'no', 'auto'], value: 'auto',
+       description: 'Enable DAAP sharing support using libdmapsharing')
+option('fm-radio', type: 'combo', choices: ['yes', 'no', 'auto'], value: 'auto',
+       description: 'Enable FM radio support')
+option('grilo', type: 'combo', choices: ['yes', 'no', 'auto'], value: 'auto',
+       description: 'Enable Grilo support')
+option('gudev', type: 'combo', choices: ['yes', 'no', 'auto'], value: 'auto',
+       description: 'Enable GUdev for hardware detection')
+option('hal', type: 'combo', choices: ['yes', 'no', 'auto'], value: 'auto',
+       description: 'Enable HAL for hardware detection')
+option('ipod', type: 'combo', choices: ['yes', 'no', 'auto'], value: 'auto',
+       description: 'Enable iPod support')
+option('libnotify', type: 'combo', choices: ['yes', 'no', 'auto'], value: 'auto',
+       description: 'Enable desktop notifications with libnotify')
+option('libsecret', type: 'combo', choices: ['yes', 'no', 'auto'], value: 'auto',
+       description: 'Enable keyring support using libsecret')
+option('lirc', type: 'combo', choices: ['yes', 'no', 'auto'], value: 'auto',
+       description: 'Enable lirc support')
+option('mmkeys', type: 'combo', choices: ['yes', 'no', 'auto'], value: 'auto',
+       description: 'Enable multimedia keys support')
+option('mtp', type: 'combo', choices: ['yes', 'no', 'auto'], value: 'auto',
+       description: 'Enable MTP support')
+option('python-plugins', type: 'combo', choices: ['yes', 'no', 'auto'], value: 'auto',
+       description: 'Enable Python plugins')
+option('vala-plugins', type: 'combo', choices: ['yes', 'no', 'auto'], value: 'auto',
+       description: 'Enable Vala plugins')
+
+option('database', type: 'combo', choices: ['tree'], value: 'tree',
+       description: 'Select the database to use (default tree)')
+option('more-warnings', type: 'combo', choices: ['yes', 'no', 'auto'], value: 'auto',
+       description: 'Maximum compiler warnings')
+option('rhythmdb-debug', type: 'combo', choices: ['0', '1', '2'], value: '0',
+       description: 'Level of RhythmDB sanity checking')
+option('uninstalled-build', type: 'boolean', value: false,
+       description: 'Search for files in build directory as well in the install prefix')
diff --git a/metadata/meson.build b/metadata/meson.build
new file mode 100644
index 000000000..f9a471d3f
--- /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]
+
+# 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, gstreamer, gstreamer_pbutils, gtk])
+
+executable('rhythmbox-metadata', metadata_dbus_service_sources,
+  link_with: rbmetadatasvc_lib,
+  dependencies: [librb_dep, rbmetadata_dep, gstreamer, gstreamer_pbutils, 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..d9b3141f2
--- /dev/null
+++ b/plugins/audiocd/meson.build
@@ -0,0 +1,33 @@
+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)
+
+test('test-cd',
+  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..33f6a746c
--- /dev/null
+++ b/plugins/brasero-disc-recorder/meson.build
@@ -0,0 +1,20 @@
+brasero_disc_recorder_plugin_dir = plugindir + '/brasero-disc-recorder'
+brasero_disc_recorder_plugin_data_dir = plugindatadir + '/brasero-disc-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..79fa26776
--- /dev/null
+++ b/plugins/lirc/meson.build
@@ -0,0 +1,22 @@
+lirc_plugin_dir = plugindir + '/rblirc'
+lirc_plugin_data_dir = plugindatadir + '/rblirc'
+
+lirc_sources = [
+  'rb-lirc-plugin.c'
+]
+
+shared_module('lirc',
+  lirc_sources,
+  c_args: ['-DHAVE_CONFIG_H'],
+  dependencies: [rhythmbox_core_dep, lirc],
+  install_dir: lirc_plugin_dir)
+
+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/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/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..e06d5db83
--- /dev/null
+++ b/plugins/meson.build
@@ -0,0 +1,64 @@
+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')
+
+  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..54cfbdf90
--- /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(datadir),
+]
+
+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..6850b8f5c
--- /dev/null
+++ b/po/meson.build
@@ -0,0 +1,86 @@
+i18n = import('i18n')
+
+langs = [
+  'af',
+  'am',
+  'ar',
+  'as',
+  'az',
+  'be',
+  'be@latin',
+  'bg',
+  'bn_IN',
+  'br',
+  'bs',
+  'ca',
+  'ca@valencia',
+  'cs',
+  'cy',
+  'da',
+  'de',
+  'dz',
+  'el',
+  'en_CA',
+  'en_GB',
+  'eo',
+  'es',
+  'et',
+  'eu',
+  'fa',
+  'fi',
+  'fr',
+  'ga',
+  'gd',
+  'gl',
+  'gu',
+  'he',
+  'hi',
+  'hr',
+  'hu',
+  'id',
+  'is',
+  'it',
+  'ja',
+  'kk',
+  'kn',
+  'ko',
+  'lt',
+  'lv',
+  'mk',
+  'ml',
+  'mn',
+  'mr',
+  'ms',
+  'nb',
+  'nds',
+  'ne',
+  'nl',
+  'nn',
+  'oc',
+  'or',
+  'pa',
+  'pl',
+  'ps',
+  'pt',
+  'pt_BR',
+  'ro',
+  'ru',
+  'rw',
+  'si',
+  'sk',
+  'sl',
+  'sr',
+  'sr@latin',
+  'sv',
+  'ta',
+  'te',
+  'th',
+  'tr',
+  'uk',
+  'vi',
+  'zh_CN',
+  'zh_HK',
+  'zh_TW',
+]
+
+i18n.gettext('rhythmbox', languages : langs)
diff --git a/podcast/meson.build b/podcast/meson.build
new file mode 100644
index 000000000..2ebca49b6
--- /dev/null
+++ b/podcast/meson.build
@@ -0,0 +1,71 @@
+podcast_headers = files(
+  '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])
+
+if enable_browser_plugin
+  mozilla_plugin = shared_library(
+    'rhythmbox-itms-plugin.c',
+    install_dir: mozilla_plugindir)
+endif
diff --git a/remote/dbus/meson.build b/remote/dbus/meson.build
new file mode 100644
index 000000000..9a932f0d5
--- /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="' + datadir + '"',
+  '-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..4315c24cf
--- /dev/null
+++ b/rhythmdb/meson.build
@@ -0,0 +1,58 @@
+rhythmdb_headers = files(
+  'rb-refstring.h',
+  'rhythmdb.h',
+  'rhythmdb-entry.h',
+  'rhythmdb-entry-type.h',
+  'rhythmdb-import-job.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="' + datadir + '"',
+  '-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/shell/meson.build b/shell/meson.build
new file mode 100644
index 000000000..d6c5be4ed
--- /dev/null
+++ b/shell/meson.build
@@ -0,0 +1,154 @@
+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-application.h',
+  '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-task-list.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="' + datadir + '"',
+  '-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..f2a0cf9fe
--- /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="' + datadir + '"',
+  '-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..626341d0f
--- /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="' + datadir + '"',
+  '-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]