[rhythmbox/wip/sam/meson: 35/39] Meson build instructions



commit a364ef1f933d4015a6d6e1c0545afbb51c597444
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.
    
    The Meson build instructions should now be feature-complete, if a little
    messy and buggy.
    
    They depend on <https://github.com/mesonbuild/meson/pull/793/> being
    merged.

 backends/gstreamer/meson.build            |   15 +
 backends/meson.build                      |   25 ++
 data/meson.build                          |   18 +
 lib/libmediaplayerid/meson.build          |   25 ++
 lib/meson.build                           |   60 ++++
 meson.build                               |  486 +++++++++++++++++++++++++++++
 meson_options.txt                         |   41 +++
 metadata/meson.build                      |   58 ++++
 plugins/android/meson.build               |   24 ++
 plugins/artsearch/meson.build             |   20 ++
 plugins/audiocd/meson.build               |   32 ++
 plugins/audioscrobbler/meson.build        |   49 +++
 plugins/brasero-disc-recorder/meson.build |   19 ++
 plugins/context/meson.build               |   39 +++
 plugins/daap/meson.build                  |   41 +++
 plugins/dbus-media-server/meson.build     |   19 ++
 plugins/fmradio/meson.build               |   27 ++
 plugins/generic-player/meson.build        |   27 ++
 plugins/grilo/meson.build                 |   22 ++
 plugins/im-status/meson.build             |   14 +
 plugins/ipod/meson.build                  |   30 ++
 plugins/iradio/meson.build                |   29 ++
 plugins/lirc/meson.build                  |   22 ++
 plugins/lyrics/meson.build                |   28 ++
 plugins/magnatune/meson.build             |   28 ++
 plugins/meson.build                       |   68 ++++
 plugins/mmkeys/meson.build                |   18 +
 plugins/mpris/meson.build                 |   17 +
 plugins/mtpdevice/meson.build             |   36 +++
 plugins/notification/meson.build          |   18 +
 plugins/power-manager/meson.build         |   19 ++
 plugins/pythonconsole/meson.build         |   14 +
 plugins/rb/meson.build                    |   18 +
 plugins/rbzeitgeist/meson.build           |   14 +
 plugins/replaygain/meson.build            |   20 ++
 plugins/sendto/meson.build                |   14 +
 plugins/soundcloud/meson.build            |   21 ++
 plugins/visualizer/meson.build            |   34 ++
 plugins/webremote/meson.build             |   31 ++
 po/meson.build                            |   86 +++++
 podcast/meson.build                       |   61 ++++
 rhythmdb/meson.build                      |   59 ++++
 shell/meson.build                         |  134 ++++++++
 sources/meson.build                       |   62 ++++
 sources/sync/meson.build                  |   20 ++
 tests/meson.build                         |   46 +++
 widgets/meson.build                       |   59 ++++
 47 files changed, 2067 insertions(+), 0 deletions(-)
---
diff --git a/backends/gstreamer/meson.build b/backends/gstreamer/meson.build
new file mode 100644
index 0000000..8275750
--- /dev/null
+++ b/backends/gstreamer/meson.build
@@ -0,0 +1,15 @@
+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="' + get_option('datadir') + '/locale"',
+  '-DG_LOG_DOMAIN="Rhythmbox"',
+]
+
+gstreamer_backend_dependencies = [gdk_pixbuf]
+
+gstreamer_backend_link_args = ['-export-dynamic']
diff --git a/backends/meson.build b/backends/meson.build
new file mode 100644
index 0000000..da99460
--- /dev/null
+++ b/backends/meson.build
@@ -0,0 +1,25 @@
+subdir('gstreamer')
+
+backend_headers = [
+  'rb-encoder.h',
+  'rb-player.h',
+  'rb-player-gst-filter.h',
+  'rb-player-gst-tee.h'
+]
+
+install_headers(backend_headers, subdir: 'rhythmbox/backends')
+
+backend_sources = files(
+  'rb-encoder.c',
+  'rb-player.c',
+  'rb-player-gst-filter.c',
+  'rb-player-gst-tee.c',
+)
+
+backend_c_args = [
+  '-DGNOMELOCALEDIR="' + get_option('datadir') + '/locale"',
+  '-DG_LOG_DOMAIN="Rhythmbox"',
+]
+
+backend_dependencies = []
+backend_link_args = ['-export-dynamic']
diff --git a/data/meson.build b/data/meson.build
new file mode 100644
index 0000000..00f79da
--- /dev/null
+++ b/data/meson.build
@@ -0,0 +1,18 @@
+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@'],
+)
diff --git a/lib/libmediaplayerid/meson.build b/lib/libmediaplayerid/meson.build
new file mode 100644
index 0000000..9bb9018
--- /dev/null
+++ b/lib/libmediaplayerid/meson.build
@@ -0,0 +1,25 @@
+mpid_headers = [
+  '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
diff --git a/lib/meson.build b/lib/meson.build
new file mode 100644
index 0000000..b275887
--- /dev/null
+++ b/lib/meson.build
@@ -0,0 +1,60 @@
+subdir('libmediaplayerid')
+
+lib_headers = [
+  '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-util.h',
+  'rb-task-progress.h',
+  'rb-task-progress-simple.h'
+]
+
+install_headers(lib_headers, subdir: 'rhythmbox/lib')
+
+lib_sources = [
+  'rb-debug.c',
+  'rb-file-helpers.c',
+  'rb-builder-helpers.c',
+  'rb-stock-icons.c',
+  'rb-cut-and-paste-code.c',
+  'rb-util.c',
+  'rb-tree-dnd.c',
+  'rb-string-value-map.c',
+  'rb-async-queue-watch.c',
+  'rb-text-helpers.c',
+  'rb-gst-media-types.c',
+  'rb-missing-plugins.c',
+  'rb-async-copy.c',
+  'rb-chunk-loader.c',
+  'rb-task-progress.c',
+  'rb-task-progress-simple.c',
+  'rb-list-model.c'
+]
+
+lib_c_args = [
+  '-DGNOMELOCALEDIR="' + get_option('datadir') + '/locale"',
+  '-DSHARE_DIR="' + get_option('datadir') + '"',
+  '-DDATADIR="' + get_option('datadir') + '"'
+]
+
+lib_dependencies = [
+   gio, gio_unix, glib, gobject, gstreamer, gstreamer_pbutils, gtk, libpeas,
+   libpeas_gtk, libxml
+]
+
+librb = library('rb', lib_sources,
+  c_args: lib_c_args + ['-DG_LOG_DOMAIN="Rhythmbox"'],
+  include_directories: [configinc],
+  dependencies: lib_dependencies,
+  install: true,
+  link_args: ['-export-dynamic']
+)
+
+lib_dep = declare_dependency(
+  link_with: librb,
+  dependencies: lib_dependencies,
+  include_directories: [configinc, libinc],
+)
diff --git a/meson.build b/meson.build
new file mode 100644
index 0000000..60d9fe1
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,486 @@
+# Requires the following Meson patch:
+#
+#   https://github.com/mesonbuild/meson/pull/793
+#     gnome: allow use of generated files with compile_resources()
+#
+#GRILO_REQS=0.3.0
+
+project('rhythmbox', 'c',
+  version: '3.4.1')
+
+gnome = import('gnome')
+
+# 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
+
+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('notify') == '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
+  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 not 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')
+
+deps_rb_client = [glib, gio, gtk, gio_unix]
+
+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.set10('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', '-Werror',
+    '-Wno-deprecated-declarations', '-std=gnu89']
+
+  # 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')
+
+#################
+# Plugin support
+
+#PLUGIN_LIBTOOL_FLAGS="-module -avoid-version"
+#AC_SUBST(PLUGIN_LIBTOOL_FLAGS)
+#
+plugindir = get_option('libdir') + '/rhythmbox/plugins'
+cdata.set('PLUGINDIR', get_option('prefix') + '/' + plugindir)
+
+plugindatadir = get_option('datadir') + '/rhythmbox/plugins'
+cdata.set('PLUGINDATADIR', get_option('prefix') + '/' + plugindatadir)
+cdata.set('SAMPLEPLUGINDIR', get_option('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')
+
+  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
+
+use_clutter = false
+if get_option('visualizer') != 'no'
+  clutter = dependency('clutter-1.0', version: '>= 1.8', required: false)
+  clutter_x11 = dependency('clutter-x11-1.0', version: '>= 1.8', required: false)
+  clutter_gst = dependency('clutter-gst-2.0', version: '>= 2.0', required: false)
+  clutter_gtk = dependency('clutter-gtk-1.0', version: '>= 1.8', required: false)
+  mx = dependency('mx-1.0', version: '>= 1.0.1', required: false)
+
+  if clutter.found() and clutter_x11.found() and clutter_gst.found() and clutter_gtk.found() and mx.found()
+    use_clutter = true
+  elif get_option('visualizer') == 'yes'
+    error('Visualizer support explicitly requested, but clutter 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
+
+configure_file(
+  input: 'rhythmbox.pc.in',
+  install: true,
+  installdir: get_option('libdir') + '/pkgconfig',
+  output: 'rhythmbox.pc',
+  configuration: cdata
+)
+
+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
+
+if use_clutter
+  message('** Visualizer plugin enabled')
+else
+  message('   Visualizer plugin disabled')
+endif
+
+message('End options')
+
+configinc = include_directories('.')
+backendsinc = include_directories('backends')
+gstreamerbackendinc = include_directories('backends/gstreamer')
+libinc = include_directories('lib')
+libmediaplayeridinc = include_directories('lib/libmediaplayerid')
+metadatainc = include_directories('metadata')
+pluginsinc = include_directories('plugins')
+podcastinc = include_directories('podcast')
+rhythmdbinc = include_directories('rhythmdb')
+shellinc = include_directories('shell')
+sourcesinc = include_directories('sources')
+sourcessyncinc = include_directories('sources/sync')
+widgetsinc = include_directories('widgets')
+
+subdir('data')
+
+subdir('lib')
+subdir('metadata')
+subdir('rhythmdb')
+subdir('backends')
+subdir('podcast')
+subdir('sources')
+subdir('widgets')
+subdir('shell')
+subdir('plugins')
+
+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)
+
+# These are interactive UI tests.
+
+test_rb_segmented_bar = executable('widgets/test-rb-segmented-bar', 'widgets/test-rb-segmented-bar.c',
+  dependencies: [rhythmbox_core_dep])
+
+test_uri_dialog = executable('widgets/test-uri-dialog', 'widgets/test-uri-dialog.c',
+  dependencies: [rhythmbox_core_dep])
diff --git a/meson_options.txt b/meson_options.txt
new file mode 100644
index 0000000..ab0dcf9
--- /dev/null
+++ b/meson_options.txt
@@ -0,0 +1,41 @@
+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('visualizer', type: 'combo', choices: ['yes', 'no', 'auto'], value: 'auto',
+       description: 'Enable visualizer plugin support')
+
+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,
+       descrption: '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 0000000..9788254
--- /dev/null
+++ b/metadata/meson.build
@@ -0,0 +1,58 @@
+metadata_headers = [
+  '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="' + get_option('datadir') + '/locale"',
+  '-DG_LOG_DOMAIN="Rhythmbox"',
+  '-DLIBEXECDIR="' + 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
+
+# client library
+
+metadata_dependencies = [lib_dep, tdb]
+metadata_link_args = ['-export-dynamic']
+
+# (this gets linked into librhythmbox-core)
+
+# service
+
+librbmetadatasvc = static_library('rbmetadatasvc', metadata_service_sources,
+  dependencies: [lib_dep, glib, gobject, gstreamer, gstreamer_pbutils, gtk])
+
+executable('rhythmbox-metadata', metadata_dbus_service_sources,
+  link_with: librbmetadatasvc,
+  dependencies: [glib, gobject, gstreamer, gstreamer_pbutils, gtk],
+  include_directories: [configinc, libinc],
+  install: true)
diff --git a/plugins/android/meson.build b/plugins/android/meson.build
new file mode 100644
index 0000000..52e5d49
--- /dev/null
+++ b/plugins/android/meson.build
@@ -0,0 +1,24 @@
+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_library('android',
+  android_sources,
+  c_args: ['-DHAVE_CONFIG_H'],
+  dependencies: [rhythmbox_core_dep, gudev],
+  include_directories: pluginsinc,
+  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 0000000..1bba920
--- /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 0000000..29eecf2
--- /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_library('audiocd',
+  audiocd_sources,
+  dependencies: [rhythmbox_core_dep, totem_plparser],
+  include_directories: pluginsinc,
+  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 0000000..f4850b4
--- /dev/null
+++ b/plugins/audioscrobbler/meson.build
@@ -0,0 +1,49 @@
+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_library('audioscrobbler',
+  audioscrobbler_sources,
+  c_args: ['-DHAVE_CONFIG_H'],
+  dependencies: [rhythmbox_core_dep, json_glib, totem_plparser],
+  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 0000000..309ec71
--- /dev/null
+++ b/plugins/brasero-disc-recorder/meson.build
@@ -0,0 +1,19 @@
+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_library('cd-recorder',
+  brasero_disc_recorder_sources,
+  c_args: ['-DHAVE_CONFIG_H'],
+  dependencies: [rhythmbox_core_dep, brasero_media],
+  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 0000000..055caf4
--- /dev/null
+++ b/plugins/context/meson.build
@@ -0,0 +1,39 @@
+context_plugin_dir = plugindir + '/context'
+context_plugin_data_dir = plugindir + '/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 0000000..260648c
--- /dev/null
+++ b/plugins/daap/meson.build
@@ -0,0 +1,41 @@
+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_library('daap',
+  daap_sources,
+  c_args: ['-DHAVE_CONFIG_H'],
+  dependencies: daap_dependencies,
+  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 0000000..1d31570
--- /dev/null
+++ b/plugins/dbus-media-server/meson.build
@@ -0,0 +1,19 @@
+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_library('dbus-media-server',
+  dbus_media_server_sources,
+  c_args: ['-DHAVE_CONFIG_H'],
+  dependencies: [rhythmbox_core_dep],
+  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 0000000..987d7da
--- /dev/null
+++ b/plugins/fmradio/meson.build
@@ -0,0 +1,27 @@
+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_library('fmradio',
+  fmradio_sources,
+  c_args: ['-DHAVE_CONFIG_H'],
+  dependencies: [rhythmbox_core_dep],
+  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 0000000..6bb4a8d
--- /dev/null
+++ b/plugins/generic-player/meson.build
@@ -0,0 +1,27 @@
+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_library('generic-player',
+  generic_player_sources,
+  c_args: ['-DHAVE_CONFIG_H'],
+  dependencies: [rhythmbox_core_dep],
+  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 0000000..16564c7
--- /dev/null
+++ b/plugins/grilo/meson.build
@@ -0,0 +1,22 @@
+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_library('grilo',
+  grilo_sources,
+  c_args: ['-DHAVE_CONFIG_H'],
+  dependencies: grilo_dependencies,
+  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 0000000..9ae65e4
--- /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 0000000..de3bb82
--- /dev/null
+++ b/plugins/ipod/meson.build
@@ -0,0 +1,30 @@
+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_library('ipod',
+  ipod_sources,
+  c_args: ['-DHAVE_CONFIG_H'],
+  dependencies: ipod_dependencies,
+  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 0000000..cb55dfb
--- /dev/null
+++ b/plugins/iradio/meson.build
@@ -0,0 +1,29 @@
+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_library('iradio',
+  iradio_sources,
+  c_args: ['-DHAVE_CONFIG_H'],
+  dependencies: iradio_dependencies,
+  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 0000000..e65d80a
--- /dev/null
+++ b/plugins/lirc/meson.build
@@ -0,0 +1,22 @@
+lirc_plugin_dir = plugindir + '/lirc'
+lirc_plugin_data_dir = plugindatadir + '/lirc'
+
+lirc_sources = [
+  'rb-lirc-plugin.c'
+]
+
+shared_library('lirc',
+  lirc_sources,
+  c_args: ['-DHAVE_CONFIG_H'],
+  dependencies: [rhythmbox_core_dep, lirc_client],
+  install_dir: lirc_plugin_dir)
+
+lirc_plugin_descriptor = custom_target('lirc-plugin-descriptor',
+  input: 'lirc.plugin.in',
+  output: 'lirc.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 0000000..a365296
--- /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 0000000..dc0aa8e
--- /dev/null
+++ b/plugins/magnatune/meson.build
@@ -0,0 +1,28 @@
+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)
diff --git a/plugins/meson.build b/plugins/meson.build
new file mode 100644
index 0000000..5193cf3
--- /dev/null
+++ b/plugins/meson.build
@@ -0,0 +1,68 @@
+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('lyrics')
+  subdir('magnatune')
+  subdir('pythonconsole')
+  subdir('rbzeitgeist')
+  subdir('replaygain')
+  subdir('sendto')
+  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_clutter
+  subdir('visualizer')
+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 0000000..f52afa6
--- /dev/null
+++ b/plugins/mmkeys/meson.build
@@ -0,0 +1,18 @@
+mmkeys_plugin_dir = plugindir + '/mmkeys'
+
+mmkeys_sources = [
+  'rb-mmkeys-plugin.c']
+
+shared_library('mmkeys',
+  mmkeys_sources,
+  dependencies: [rhythmbox_core_dep],
+  c_args: ['-DHAVE_CONFIG_H'],
+  include_directories: pluginsinc,
+  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 0000000..2b06d01
--- /dev/null
+++ b/plugins/mpris/meson.build
@@ -0,0 +1,17 @@
+mpris_plugin_dir = plugindir + '/mpris'
+
+mpris_sources = [
+  'rb-mpris-plugin.c']
+
+shared_library('mpris',
+  mpris_sources,
+  dependencies: [rhythmbox_core_dep],
+  include_directories: pluginsinc,
+  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 0000000..085f5df
--- /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-gst-sink.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_library('mtpdevice',
+  mtpdevice_sources,
+  c_args: ['-DHAVE_CONFIG_H'],
+  dependencies: mtpdevice_dependencies,
+  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 0000000..fee8a80
--- /dev/null
+++ b/plugins/notification/meson.build
@@ -0,0 +1,18 @@
+notification_plugin_dir = plugindir + '/notification'
+
+notification_sources = [
+  'rb-notification-plugin.c']
+
+shared_library('notification',
+  notification_sources,
+  dependencies: [rhythmbox_core_dep, libnotify],
+  c_args: ['-DHAVE_CONFIG_H'],
+  include_directories: pluginsinc,
+  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 0000000..2975cdf
--- /dev/null
+++ b/plugins/power-manager/meson.build
@@ -0,0 +1,19 @@
+power_manager_plugin_dir = plugindir + '/power-manager'
+power_manager_plugin_data_dir = plugindatadir + '/power-manager'
+
+power_manager_sources = [
+  'rb-power-manager-plugin.c',
+]
+
+shared_library('power-manager',
+  power_manager_sources,
+  c_args: ['-DHAVE_CONFIG_H'],
+  dependencies: [rhythmbox_core_dep],
+  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 0000000..345faa7
--- /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 0000000..bfdc160
--- /dev/null
+++ b/plugins/rb/meson.build
@@ -0,0 +1,18 @@
+rb_plugin_dir = plugindir + '/rb'
+
+configure_file(
+  input: 'rbconfig.py.in',
+  output: 'rbconfig.py',
+  configuration: cdata)
+
+rb_plugin_files = [
+  'Loader.py',
+  'Coroutine.py',
+  'URLCache.py',
+  'stringmatch.py',
+  'rbconfig.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 0000000..4c26e62
--- /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 0000000..38b92f9
--- /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/sendto/meson.build b/plugins/sendto/meson.build
new file mode 100644
index 0000000..ed78066
--- /dev/null
+++ b/plugins/sendto/meson.build
@@ -0,0 +1,14 @@
+sendto_plugin_dir = plugindir + '/sendto'
+
+sendto_plugin_files = [
+  'sendto.py']
+
+install_data(sendto_plugin_files,
+  install_dir: sendto_plugin_dir)
+
+sendto_plugin_descriptor = custom_target('sendto-plugin-descriptor',
+  input: 'sendto.plugin.in',
+  output: 'sendto.plugin',
+  command: [intltool_merge, '--quiet', '--desktop-style', meson.source_root() + '/po', '@INPUT@', 
'@OUTPUT@'],
+  install: true,
+  install_dir: sendto_plugin_dir)
diff --git a/plugins/soundcloud/meson.build b/plugins/soundcloud/meson.build
new file mode 100644
index 0000000..1e6e8df
--- /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/visualizer/meson.build b/plugins/visualizer/meson.build
new file mode 100644
index 0000000..85c2509
--- /dev/null
+++ b/plugins/visualizer/meson.build
@@ -0,0 +1,34 @@
+visualizer_plugin_dir = plugindir + '/visualizer'
+visualizer_plugin_data_dir = plugindir + '/visualizer'
+
+visualizer_sources = [
+  'rb-visualizer-menu.c',
+  'rb-visualizer-page.c',
+  'rb-visualizer-fullscreen.c',
+  'rb-visualizer-plugin.c']
+
+shared_library('visualizer',
+  visualizer_sources,
+  c_args: [
+    '-DPLUGIN_SRC_DIR="@0@"'.format(meson.current_source_dir())
+  ],
+  dependencies: [rhythmbox_core_dep, clutter, clutter_gst, clutter_gtk, mx],
+  include_directories: pluginsinc,
+  install_dir: visualizer_plugin_dir)
+
+visualizer_plugin_descriptor = custom_target('visualizer-plugin-descriptor',
+  input: 'visualizer.plugin.in',
+  output: 'visualizer.plugin',
+  command: [intltool_merge, '--quiet', '--desktop-style', meson.source_root() + '/po', '@INPUT@', 
'@OUTPUT@'],
+  install: true,
+  install_dir: visualizer_plugin_dir)
+
+install_data([
+  'visualizer.css',
+  'button-active.png',
+  'button-disabled.png',
+  'button-focus.png',
+  'button-hover.png',
+  'button.png',
+  'visualizer-box.png'],
+  install_dir: visualizer_plugin_data_dir)
diff --git a/plugins/webremote/meson.build b/plugins/webremote/meson.build
new file mode 100644
index 0000000..92de466
--- /dev/null
+++ b/plugins/webremote/meson.build
@@ -0,0 +1,31 @@
+webremote_plugin_dir = plugindir + '/webremote'
+webremote_plugin_data_dir = plugindir + '/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 + '/html')
+
+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 0000000..6850b8f
--- /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 0000000..dcd7e24
--- /dev/null
+++ b/podcast/meson.build
@@ -0,0 +1,61 @@
+podcast_headers = [
+  '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 = [
+  'rb-podcast-parse.c',
+  'rb-podcast-search.c',
+  'rb-podcast-search-itunes.c',
+  'rb-podcast-search-miroguide.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-search-miroguide.c',
+  'rb-podcast-source.c',
+  'rb-podcast-parse.c',
+  'rb-podcast-manager.c',
+  'rb-podcast-entry-types.c'
+)
+
+podcast_c_args = [
+  '-DGNOMELOCALEDIR="' + get_option('datadir') + '/locale"',
+  '-DG_LOG_DOMAIN="RhythmBox"'
+]
+
+podcast_dependencies = [ json_glib, libsoup, totem_plparser ]
+
+##
+
+librbpodcast_parse = static_library('rbpodcast_parse', podcast_parse_sources,
+  c_args: c_args,
+  dependencies: [lib_dep, json_glib, libsoup, totem_plparser])
+
+test_podcast_search = executable('test-podcast-search',
+  'test-podcast-search.c',
+  c_args: c_args,
+  include_directories: [configinc, libinc],
+  dependencies: [lib_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: [lib_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/rhythmdb/meson.build b/rhythmdb/meson.build
new file mode 100644
index 0000000..d691864
--- /dev/null
+++ b/rhythmdb/meson.build
@@ -0,0 +1,59 @@
+headers = [
+  'rb-refstring.h',
+  'rhythmdb.h',
+  'rhythmdb-property-model.h',
+  'rhythmdb-query-model.h',
+  'rhythmdb-query-result-list.h',
+  'rhythmdb-query-results.h',
+  'rhythmdb-import-job.h',
+  'rhythmdb-entry.h',
+  'rhythmdb-entry-type.h',
+  'rhythmdb-metadata-cache.h'
+]
+
+install_headers(headers, subdir: 'rhythmbox/rhythmdb')
+
+sources = [
+  'rb-refstring.c',
+  'rhythmdb.c',
+  'rhythmdb-monitor.c',
+  'rhythmdb-query.c',
+  'rhythmdb-property-model.c',
+  'rhythmdb-query-model.c',
+  'rhythmdb-query-result-list.c',
+  'rhythmdb-query-results.c',
+  'rhythmdb-import-job.c',
+  'rhythmdb-entry-type.c',
+  'rhythmdb-song-entry-types.c',
+  'rhythmdb-dbus.c',
+  'rhythmdb-metadata-cache.c'
+]
+
+if get_option('database') == 'tree'
+  sources += ['rhythmdb-tree.c']
+endif
+
+c_args = [
+  '-DGNOMELOCALEDIR="' + get_option('datadir') + '/locale"',
+  '-DG_LOG_DOMAIN="RhythmDB"',
+  '-DSHARE_DIR="' + get_option('datadir') + '"',
+  '-DDATADIR="' + get_option('datadir') + '"'
+]
+
+if use_no_strict_aliasing
+  c_args += ['-fno-strict-aliasing']
+endif
+
+rhythmdb_dependencies = [lib_dep, libmath]
+
+librhythmdb = static_library('rhythmdb', sources,
+  c_args: c_args,
+  dependencies: rhythmdb_dependencies,
+  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 0000000..0170fbc
--- /dev/null
+++ b/shell/meson.build
@@ -0,0 +1,134 @@
+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 = [
+  '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 = [
+  authors_tab,
+  documenters_tab,
+  maintainers_tab,
+  maintainers_old_tab,
+  '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-statusbar.c',
+  'rb-task-list.c',
+  'rb-track-transfer-batch.c',
+  'rb-track-transfer-queue.c',
+  resources
+]
+
+shell_c_args = [
+  '-DGNOMELOCALEDIR="' + get_option('datadir') + '/locale"',
+  '-DG_LOG_DOMAIN="Rhythmbox"',
+  '-DPIXMAP_DIR="' + get_option('datadir') + '/pixmaps"',
+  '-DSHARE_DIR="' + get_option('datadir') + '"',
+  '-DDATADIR="' + get_option('datadir') + '"',
+  '-DLIBDIR="' + get_option('libdir') + '"',
+  '-D__EXTENSIONS__',
+]
+
+shell_dependencies = []
+
+rhythmbox_core_dependencies = [ lib_dep, rhythmdb_dep, gstreamer_plugins_base, gstreamer_base, 
gstreamer_tag, gstreamer_pbutils, gstreamer_audio, gstreamer_controller, gudev ] + (
+  backend_dependencies + gstreamer_backend_dependencies + metadata_dependencies + mpid_dependencies +
+  podcast_dependencies + shell_dependencies + source_dependencies + widget_dependencies)
+
+rhythmbox_core_include_directories = [
+  configinc, backendsinc, gstreamerbackendinc, libinc, libmediaplayeridinc, metadatainc,
+  podcastinc, pluginsinc, rhythmdbinc, shellinc, sourcesinc, sourcessyncinc,
+  widgetsinc
+]
+
+librhythmbox_core = shared_library('rhythmbox_core',
+  backend_sources + gstreamer_backend_sources + metadata_sources + mpid_sources,
+  podcast_sources + shell_sources + source_sources + sourcesync_sources +
+  widget_sources,
+  c_args: shell_c_args,
+  include_directories: rhythmbox_core_include_directories,
+  dependencies: rhythmbox_core_dependencies,
+  install: 'true',
+  link_args: ['-export-dynamic', '-Wno-undef'],
+  version: '@0@.@1@.@2@'.format(RHYTHMBOX_CORE_CURRENT, RHYTHMBOX_CORE_REVISION, RHYTHMBOX_CORE_AGE)
+)
+
+rhythmbox_core_dep = declare_dependency(
+  link_with: librhythmbox_core,
+  dependencies: rhythmbox_core_dependencies,
+  include_directories: rhythmbox_core_include_directories,
+)
+
+deps_rhythmbox = [gobject_introspection,
+                  gstreamer_base, gstreamer_plugins_base,
+                  gtk, gdk_pixbuf, gio, gio_unix, libsoup, 
+                  tdb, json_glib]
+
+if gdk_targets.contains('x11')
+  deps_rhythmbox = deps_rhythmbox + [x11]
+endif
+
+if enable_python
+  deps_rhythmbox += [pygobject]
+endif
+
+executable('rhythmbox', 'main.c',
+  dependencies: deps_rhythmbox,
+  include_directories: [
+    configinc, backendsinc, libinc, libmediaplayeridinc, metadatainc,
+    podcastinc, pluginsinc, rhythmdbinc, shellinc, sourcesinc
+  ],
+  link_args: ['-export-dynamic', '-Wno-undef'],
+  link_with: librhythmbox_core
+)
diff --git a/sources/meson.build b/sources/meson.build
new file mode 100644
index 0000000..5e76829
--- /dev/null
+++ b/sources/meson.build
@@ -0,0 +1,62 @@
+subdir('sync')
+
+source_headers = [
+  'rb-source.h',
+  'rb-streaming-source.h',
+  'rb-source-search.h',
+  'rb-display-page.h',
+  'rb-display-page-group.h',
+  'rb-display-page-tree.h',
+  'rb-display-page-menu.h',
+  'rb-display-page-model.h',
+  'rb-browser-source.h',
+  'rb-media-player-source.h',
+  'rb-playlist-source.h',
+  'rb-playlist-xml.h',
+  'rb-auto-playlist-source.h',
+  'rb-static-playlist-source.h',
+  'rb-source-search-basic.h',
+  'rb-device-source.h',
+  'rb-transfer-target.h'
+]
+
+install_headers(source_headers, subdir: 'rhythmbox/sources')
+
+source_sources = files(
+  'rb-source.c',
+  'rb-streaming-source.c',
+  'rb-source-search.c',
+  'rb-display-page.c',
+  'rb-display-page-group.c',
+  'rb-display-page-tree.c',
+  'rb-display-page-menu.c',
+  'rb-display-page-model.c',
+  'rb-browser-source.c',
+  'rb-library-source.c',
+  'rb-media-player-source.c',
+  'rb-playlist-source.c',
+  'rb-auto-playlist-source.c',
+  'rb-static-playlist-source.c',
+  'rb-play-queue-source.c',
+  'rb-missing-files-source.c',
+  'rb-import-errors-source.c',
+  'rb-source-search-basic.c',
+  'rb-device-source.c',
+  'rb-transfer-target.c'
+)
+
+source_c_args = [
+  '-DGNOMELOCALEDIR="' + get_option('datadir') + '/locale"',
+  '-DG_LOG_DOMAIN="Rhythmbox"',
+  '-DPIXMAP_DIR="' + get_option('datadir') + '/pixmaps"',
+  '-DSHARE_DIR="' + get_option('datadir') + '"',
+  '-DDATADIR="' + get_option('datadir') + '"',
+]
+
+if use_no_strict_aliasing
+  source_c_args += ['-fno-strict-aliasing']
+endif
+
+source_dependencies = [totem_plparser]
+
+source_link_args = ['-export-dynamic']
diff --git a/sources/sync/meson.build b/sources/sync/meson.build
new file mode 100644
index 0000000..b5d210d
--- /dev/null
+++ b/sources/sync/meson.build
@@ -0,0 +1,20 @@
+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="' + get_option('datadir') + '/locale"',
+  '-DG_LOG_DOMAIN="Rhythmbox"',
+  '-DPIXMAP_DIR="' + get_option('datadir') + '/pixmaps"',
+  '-DSHARE_DIR="' + get_option('datadir') + '"',
+  '-DDATADIR="' + get_option('datadir') + '"',
+]
+
+if use_no_strict_aliasing
+  sourcesync_c_args += ['-fno-strict-aliasing']
+endif
+
+sourcesync_link_args = ['-export-dynamic']
diff --git a/tests/meson.build b/tests/meson.build
new file mode 100644
index 0000000..edb0f61
--- /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 0000000..a960645
--- /dev/null
+++ b/widgets/meson.build
@@ -0,0 +1,59 @@
+widget_headers = [
+  'rb-alert-dialog.h',
+  'rb-entry-view.h',
+  'rb-property-view.h',
+  'rb-dialog.h',
+  'rb-cell-renderer-pixbuf.h',
+  'rb-cell-renderer-rating.h',
+  'rb-rating.h',
+  'rb-library-browser.h',
+  'rb-segmented-bar.h',
+  'rb-song-info.h',
+  'rb-source-toolbar.h',
+  'rb-uri-dialog.h',
+  'rb-fading-image.h',
+  'rb-object-property-editor.h',
+  'rb-import-dialog.h',
+  'rb-button-bar.h',
+  'rb-task-list-display.h',
+  'rb-encoding-settings.h'
+]
+
+install_headers(widget_headers, subdir: 'rhythmbox/widgets')
+
+widget_sources = files(
+  'rb-alert-dialog.c',
+  'rb-entry-view.c',
+  'rb-property-view.c',
+  'rb-search-entry.c',
+  'rb-header.c',
+  'rb-dialog.c',
+  'rb-cell-renderer-pixbuf.c',
+  'rb-cell-renderer-rating.c',
+  'gossip-cell-renderer-expander.c',
+  'rb-song-info.c',
+  'rb-rating.c',
+  'rb-rating-helper.c',
+  'rb-segmented-bar.c',
+  'rb-library-browser.c',
+  'rb-query-creator.c',
+  'rb-query-creator-properties.c',
+  'rb-uri-dialog.c',
+  'eggwrapbox.c',
+  'eggwrapbox-enums.c',
+  'rb-source-toolbar.c',
+  'rb-fading-image.c',
+  'rb-object-property-editor.c',
+  'rb-import-dialog.c',
+  'rb-button-bar.c',
+  'rb-task-list-display.c',
+  'rb-encoding-settings.c'
+)
+
+widget_c_args = [
+  '-DGNOMELOCALEDIR="' + get_option('datadir') + '/locale"',
+  '-DG_LOG_DOMAIN="Rhythmbox"',
+]
+
+widget_dependencies = [ libnotify ]
+widget_link_args = ['-export-dynamic']


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