[rhythmbox/wip/sam/meson: 6/7] Work in progress: add Meson build instructions



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

    Work in progress: add Meson build instructions
    
    See <http://www.mesonbuild.com/> for more information about Meson.
    
    No plugins, translations, or tests yet

 backends/gstreamer/meson.build   |   26 +++
 backends/meson.build             |   36 +++
 data/meson.build                 |    8 +
 lib/libmediaplayerid/meson.build |   31 +++
 lib/meson.build                  |   58 +++++
 meson.build                      |  449 ++++++++++++++++++++++++++++++++++++++
 meson_options.txt                |   41 ++++
 metadata/meson.build             |   76 +++++++
 plugins/meson.build              |   71 ++++++
 podcast/meson.build              |   91 ++++++++
 rhythmdb/meson.build             |   56 +++++
 shell/meson.build                |  118 ++++++++++
 sources/meson.build              |   74 +++++++
 sources/sync/meson.build         |   33 +++
 widgets/meson.build              |   90 ++++++++
 15 files changed, 1258 insertions(+), 0 deletions(-)
---
diff --git a/backends/gstreamer/meson.build b/backends/gstreamer/meson.build
new file mode 100644
index 0000000..a78c711
--- /dev/null
+++ b/backends/gstreamer/meson.build
@@ -0,0 +1,26 @@
+gstreamer_backend_sources = [
+  'rb-encoder-gst.h',
+  'rb-encoder-gst.c',
+  'rb-player-gst-helper.c',
+  'rb-player-gst-helper.h',
+  'rb-player-gst.h',
+  'rb-player-gst.c',
+  'rb-player-gst-xfade.h',
+  'rb-player-gst-xfade.c',
+]
+
+gstreamer_backend_c_args = [
+  '-DGNOMELOCALEDIR="' + get_option('datadir') + '/locale"',
+  '-DG_LOG_DOMAIN="Rhythmbox"',
+]
+
+librbbackendsgstreamer = static_library('rbbackendsgstreamer',
+  gstreamer_backend_sources,
+  c_args: gstreamer_backend_c_args,
+  dependencies: [gdk_pixbuf, gstreamer, gtk, libxml],
+  include_directories: [
+    configinc, libinc, metadatainc, backendsinc, rhythmdbinc,
+  ],
+  install: 'true',
+  link_args: ['-export-dynamic'],
+)
diff --git a/backends/meson.build b/backends/meson.build
new file mode 100644
index 0000000..c2d5c02
--- /dev/null
+++ b/backends/meson.build
@@ -0,0 +1,36 @@
+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 = [
+  '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"',
+]
+
+librbbackends = static_library('rbbackends', backend_sources,
+  c_args: backend_c_args,
+  dependencies: [
+    gdk_pixbuf, glib, gstreamer, gtk, libxml
+  ],
+  include_directories: [
+    configinc, libinc, metadatainc, rhythmdbinc,
+    include_directories('gstreamer'),
+  ],
+  install: 'true',
+  link_args: ['-export-dynamic'],
+  link_with: [librbbackendsgstreamer]
+)
diff --git a/data/meson.build b/data/meson.build
new file mode 100644
index 0000000..ebf62cb
--- /dev/null
+++ b/data/meson.build
@@ -0,0 +1,8 @@
+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
diff --git a/lib/libmediaplayerid/meson.build b/lib/libmediaplayerid/meson.build
new file mode 100644
index 0000000..31e0a96
--- /dev/null
+++ b/lib/libmediaplayerid/meson.build
@@ -0,0 +1,31 @@
+mpid_headers = [
+  'mediaplayerid.h'
+]
+
+install_headers(mpid_headers, subdir: 'rhythmbox/lib/libmediaplayerid')
+
+mpid_sources = [
+  'mpid-private.h',
+  'mpid-device.c',
+  'mpid-files.c',
+  'mpid-util.c'
+]
+
+mpid_deps = [gio, gio_unix, glib, gobject]
+
+# use the GUdev/media-player-id implementation if possible,
+# otherwise HAL.
+if use_gudev
+  mpid_sources += ['mpid-udev.c']
+  mpid_deps += [gudev]
+elif use_hal
+  mpid_sources += ['mpid-hal.c']
+  mpid_deps += [dbus_glib, hal]
+else
+  mpid_sources += ['mpid-dummy.c']
+endif
+
+libmpid = static_library('mediaplayerid', mpid_sources,
+  install: 'true',
+  dependencies: mpid_deps,
+)
diff --git a/lib/meson.build b/lib/meson.build
new file mode 100644
index 0000000..1bc3ee5
--- /dev/null
+++ b/lib/meson.build
@@ -0,0 +1,58 @@
+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-cut-and-paste-code.h',
+  'rb-util.c',
+  'rb-tree-dnd.c',
+  'rb-tree-dnd.h',
+  'rb-string-value-map.c',
+  'rb-async-queue-watch.c',
+  'rb-async-queue-watch.h',
+  'rb-text-helpers.c',
+  'rb-text-helpers.h',
+  'rb-gst-media-types.c',
+  'rb-gst-media-types.h',
+  'rb-missing-plugins.c',
+  'rb-missing-plugins.h',
+  'rb-async-copy.c',
+  'rb-async-copy.h',
+  'rb-chunk-loader.c',
+  'rb-chunk-loader.h',
+  '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') + '"'
+]
+
+librb = library('rb', lib_sources,
+  c_args: lib_c_args + ['-DG_LOG_DOMAIN="Rhythmbox"'],
+  include_directories: [configinc],
+  dependencies: [gio, gio_unix, glib, gobject, gstreamer,
+                 gstreamer_pbutils, gtk, libpeas, libpeas_gtk, libxml],
+  install: 'true',
+  link_args: ['-export-dynamic']
+)
diff --git a/meson.build b/meson.build
new file mode 100644
index 0000000..10273e3
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,449 @@
+
+#GRILO_REQS=0.3.0
+
+project('rhythmbox', 'c',
+  version: '3.4.1')
+
+# 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)
+
+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
+
+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')
+
+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('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)
+#
+cdata.set('PLUGINDIR', get_option('libdir') + '/rhythmbox/plugins')
+cdata.set('PLUGINDATADIR', get_option('datadir') + '/rhythmbox/plugins')
+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()
+    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')
+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('backends')
+subdir('metadata')
+subdir('rhythmdb')
+subdir('plugins')
+subdir('podcast')
+subdir('sources')
+subdir('widgets')
+subdir('shell')
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..aec16d5
--- /dev/null
+++ b/metadata/meson.build
@@ -0,0 +1,76 @@
+metadata_headers = [
+  'rb-ext-db-key.h',
+  'rb-ext-db.h',
+  'rb-metadata.h'
+]
+
+install_headers(metadata_headers, subdir: 'rhythmbox/metadata')
+
+metadata_sources = [
+  'rb-ext-db-key.h',
+  'rb-ext-db-key.c',
+  'rb-ext-db.h',
+  'rb-ext-db.c',
+  'rb-metadata.h',
+  'rb-metadata-common.c',
+  'rb-metadata-dbus.h',
+  'rb-metadata-dbus.c',
+  'rb-metadata-dbus-client.c'
+]
+
+metadata_service_sources = [
+  'rb-metadata.h',
+  'rb-metadata-common.c',
+  'rb-metadata-dbus.h',
+  'rb-metadata-dbus.c',
+  'rb-metadata-gst.c',
+  'rb-metadata-gst-common.h',
+  '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
+
+librbmetadata = static_library('rbmetadata', metadata_sources,
+  dependencies: [glib, gtk, tdb],
+  include_directories: [configinc, libinc],
+  link_args: '-export-dynamic',
+  link_with: [librb])
+
+# service
+
+librbmetadatasvc = static_library('rbmetadatasvc', metadata_service_sources,
+  dependencies: [glib, gobject, gstreamer, gstreamer_pbutils, gtk],
+  include_directories: [configinc, libinc],
+  link_with: [librb])
+
+executable('rhythmbox-metadata', metadata_dbus_service_sources,
+  link_with: librbmetadatasvc,
+  dependencies: [glib, gobject, gstreamer, gstreamer_pbutils, gtk],
+  include_directories: [configinc, libinc],
+  install: true)
+
+# test program
+
+test_metadata = executable('test-metadata', 'test-metadata.c',
+  link_with: [librbmetadata, librb],
+  dependencies: [glib, gobject, gstreamer, gstreamer_pbutils],
+  include_directories: [configinc, libinc])
+test('test-metadata', test_metadata)
diff --git a/plugins/meson.build b/plugins/meson.build
new file mode 100644
index 0000000..0e5ac22
--- /dev/null
+++ b/plugins/meson.build
@@ -0,0 +1,71 @@
+plugin_headers = ['rb-plugin-macros.h']
+
+install_headers(plugin_headers, subdir: 'rhythmbox/plugins')
+
+#SUBDIRS =                                             \
+#      audiocd                                         \
+#      audioscrobbler                                  \
+#      dbus-media-server                               \
+#      generic-player                                  \
+#      iradio                                          \
+#      mmkeys                                          \
+#      mpris                                           \
+#      power-manager
+#
+#if ENABLE_PYTHON
+#SUBDIRS +=                                            \
+#      artsearch                                       \
+#      im-status                                       \
+#      lyrics                                          \
+#      magnatune                                       \
+#      pythonconsole                                   \
+#      rbzeitgeist                                     \
+#      replaygain                                      \
+#      sendto                                          \
+#      soundcloud                                      \
+#      webremote                                       \
+#      rb
+#
+#SUBDIRS += context
+#
+#endif # ENABLE_PYTHON
+#
+#if WITH_LIRC
+#SUBDIRS += lirc
+#endif
+#
+#if USE_IPOD
+#SUBDIRS += ipod
+#endif
+#
+#if HAVE_LIBBRASERO_MEDIA
+#SUBDIRS += brasero-disc-recorder
+#endif
+#
+#if USE_LIBDMAPSHARING
+#SUBDIRS += daap
+#endif
+#
+#if USE_MTP
+#SUBDIRS += mtpdevice
+#endif
+#
+#if ENABLE_FM_RADIO
+#SUBDIRS += fmradio
+#endif
+#
+#if USE_CLUTTER
+#SUBDIRS += visualizer
+#endif
+#
+#if USE_NOTIFY
+#SUBDIRS += notification
+#endif
+#
+#if ENABLE_GRILO
+#SUBDIRS += grilo
+#endif
+#
+#if USE_GUDEV
+#SUBDIRS += android
+#endif
diff --git a/podcast/meson.build b/podcast/meson.build
new file mode 100644
index 0000000..ce1ca91
--- /dev/null
+++ b/podcast/meson.build
@@ -0,0 +1,91 @@
+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-parse.h',
+  'rb-podcast-search.c',
+  'rb-podcast-search-itunes.c',
+  'rb-podcast-search-miroguide.c'
+]
+
+podcast_sources = [
+  'rb-feed-podcast-properties-dialog.c',
+  'rb-feed-podcast-properties-dialog.h',
+  'rb-podcast-add-dialog.c',
+  'rb-podcast-add-dialog.h',
+  'rb-podcast-properties-dialog.c',
+  'rb-podcast-properties-dialog.h',
+  'rb-podcast-main-source.c',
+  'rb-podcast-main-source.h',
+  'rb-podcast-search.c',
+  'rb-podcast-search-itunes.c',
+  'rb-podcast-search-miroguide.c',
+  'rb-podcast-settings.h',
+  'rb-podcast-source.c',
+  'rb-podcast-source.h',
+  'rb-podcast-parse.c',
+  'rb-podcast-manager.c',
+  'rb-podcast-entry-types.c'
+]
+
+c_args = [
+  '-DGNOMELOCALEDIR="' + get_option('datadir') + '/locale"',
+  '-DG_LOG_DOMAIN="RhythmBox"'
+]
+
+librbpodcast = static_library('rbpodcast', podcast_sources,
+  c_args: c_args,
+  include_directories: [
+    configinc, libinc, metadatainc, podcastinc, rhythmdbinc, shellinc,
+    sourcesinc, widgetsinc
+  ],
+  dependencies: [
+    glib, gobject, gstreamer, gtk, json_glib, libsoup, libxml, totem_plparser
+  ],
+  link_with: librhythmdb)
+
+librbpodcast_parse = static_library('rbpodcast_parse', podcast_parse_sources,
+  c_args: c_args,
+  include_directories: [configinc, libinc],
+  dependencies: [glib, json_glib, libsoup, totem_plparser],
+  link_with: librb)
+
+test_podcast_search = executable('test-podcast-search',
+  'test-podcast-search.c',
+  c_args: c_args,
+  include_directories: [configinc, libinc],
+  dependencies: [glib, json_glib, totem_plparser],
+  link_with: [librbpodcast_parse, librb])
+
+test_podcast_parse = executable('test-podcast-parse',
+  'test-podcast-parse.c',
+  c_args: c_args,
+  include_directories: [configinc, libinc],
+  dependencies: [glib, totem_plparser],
+  link_with: [librb, librbpodcast_parse])
+
+#
+#PLUGIN_FILES = rhythmbox-itms-plugin.c npapi.h npupp.h npruntime.h
+#
+#if ENABLE_BROWSER_PLUGIN
+#plugindir = $(MOZILLA_PLUGINDIR)
+#plugin_LTLIBRARIES = librhythmbox-itms-detection-plugin.la
+#librhythmbox_itms_detection_plugin_la_SOURCES = $(PLUGIN_FILES)
+#librhythmbox_itms_detection_plugin_la_CFLAGS = -I$(top_srcdir)/podcast
+#
+#librhythmbox_itms_detection_plugin_la_LDFLAGS = \
+#      -avoid-version  \
+#      -export-symbols $(srcdir)/plugin.symbols \
+#      -module
+#
+#endif
+#
+#EXTRA_DIST = $(PLUGIN_FILES) plugin.symbols
+#
diff --git a/rhythmdb/meson.build b/rhythmdb/meson.build
new file mode 100644
index 0000000..5a710a8
--- /dev/null
+++ b/rhythmdb/meson.build
@@ -0,0 +1,56 @@
+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-private.h',
+  '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.h', '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
+
+librhythmdb = static_library('rhythmdb', sources,
+  # GStreamer and Gtk are included in some lib/ headers, so we have to depend
+  # on them here to use librb. In case you wonder why a database library
+  # requires a GUI or audio playback...
+  c_args: c_args,
+  dependencies: [gio, glib, gobject, gstreamer, gtk, libmath, libxml, tdb],
+  include_directories: [configinc, libinc, metadatainc, podcastinc, widgetsinc],
+  link_args: '-export-dynamic',
+  link_with: [librb, librbmetadata])
diff --git a/shell/meson.build b/shell/meson.build
new file mode 100644
index 0000000..0c76718
--- /dev/null
+++ b/shell/meson.build
@@ -0,0 +1,118 @@
+gnome = import('gnome')
+
+custom_target('AUTHORS.tab',
+  input: '../AUTHORS',
+  output: 'AUTHORS.tab',
+  command: ['sed', '-e', 's/^/"/', '-e', 's/$/",/', '@INPUT@'],
+  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/')
+
+shell_sources = [
+  'rb-application.c',
+  'rb-application.h',
+  'rb-history.c',
+  'rb-play-order.c',
+  'rb-play-order-linear.c',
+  'rb-play-order-linear.h',
+  'rb-play-order-linear-loop.c',
+  'rb-play-order-linear-loop.h',
+  'rb-play-order-queue.c',
+  'rb-play-order-queue.h',
+  'rb-play-order-random.c',
+  'rb-play-order-random.h',
+  'rb-play-order-random-by-age.c',
+  'rb-play-order-random-by-age.h',
+  'rb-play-order-random-by-age-and-rating.c',
+  'rb-play-order-random-by-age-and-rating.h',
+  'rb-play-order-random-by-rating.c',
+  'rb-play-order-random-by-rating.h',
+  'rb-play-order-random-equal-weights.c',
+  'rb-play-order-random-equal-weights.h',
+  'rb-play-order-shuffle.c',
+  'rb-play-order-shuffle.h',
+  'rb-playlist-manager.c',
+  'rb-removable-media-manager.c',
+  'rb-shell.c',
+  'rb-shell-clipboard.c',
+  'rb-shell-clipboard.h',
+  'rb-shell-player.c',
+  'rb-shell-preferences.c',
+  'rb-shell-preferences.h',
+  'rb-statusbar.c',
+  'rb-statusbar.h',
+  'rb-task-list.c',
+  'rb-task-list.h',
+  '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__',
+]
+
+librhythmbox_core = shared_library('rhythmbox_core', shell_sources,
+  c_args: shell_c_args,
+  include_directories: [
+    configinc, backendsinc, libinc, libmediaplayeridinc, metadatainc,
+    podcastinc, pluginsinc, rhythmdbinc, shellinc, sourcesinc, widgetsinc
+  ],
+  dependencies: [
+    glib, gstreamer, gstreamer_audio, gstreamer_controller, gstreamer_tag, gstreamer_pbutils, gudev, libmtp,
+    libpeas, libpeas_gtk, libxml, totem_plparser,
+  ],
+  install: 'true',
+  link_args: ['-export-dynamic', '-Wno-undef'],
+  link_with: [
+    libmpid, librb, libsources, librbbackends, librbbackendsgstreamer, librbbackends, librbpodcast, 
librhythmdb, librbwidgets,
+    libsourcesync
+  ],
+  version: '@0@.@1@.@2@'.format(RHYTHMBOX_CORE_CURRENT, RHYTHMBOX_CORE_REVISION, RHYTHMBOX_CORE_AGE)
+)
+
+# note: gio-unix-2.0 is here for libmediaplayerid
+deps_rhythmbox = [gobject_introspection, gstreamer, gstreamer_audio,
+                  gstreamer_base, gstreamer_pbutils, gstreamer_plugins_base,
+                  gtk, gdk_pixbuf, glib, gio, gio_unix, libsoup, libpeas,
+                  libpeas_gtk, libxml, 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..90f2cd0
--- /dev/null
+++ b/sources/meson.build
@@ -0,0 +1,74 @@
+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 = [
+  '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-library-source.h',
+  '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-play-queue-source.h',
+  'rb-missing-files-source.c',
+  'rb-missing-files-source.h',
+  'rb-import-errors-source.c',
+  'rb-import-errors-source.h',
+  '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
+
+libsources = static_library('sources', source_sources,
+  c_args: source_c_args,
+  include_directories: [
+    configinc, backendsinc, libinc, libmediaplayeridinc, metadatainc,
+    podcastinc, rhythmdbinc, shellinc, sourcesinc, sourcessyncinc, widgetsinc,
+  ],
+  dependencies: [
+    glib, gio, gobject, gstreamer, gtk, libxml, totem_plparser ],
+  install: 'true',
+  link_args: ['-export-dynamic'],
+)
diff --git a/sources/sync/meson.build b/sources/sync/meson.build
new file mode 100644
index 0000000..21ba6e4
--- /dev/null
+++ b/sources/sync/meson.build
@@ -0,0 +1,33 @@
+sourcesync_sources = [
+  'rb-sync-settings.c',
+  'rb-sync-settings.h',
+  'rb-sync-settings-ui.c',
+  'rb-sync-settings-ui.h',
+  'rb-sync-state.c',
+  'rb-sync-state.h',
+  'rb-sync-state-ui.c',
+  'rb-sync-state-ui.h'
+]
+
+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
+
+libsourcesync = static_library('sourcesync', sourcesync_sources,
+  c_args: sourcesync_c_args,
+  include_directories: [
+    configinc, backendsinc, libinc, libmediaplayeridinc, metadatainc,
+    podcastinc, rhythmdbinc, shellinc, sourcesinc, widgetsinc,
+  ],
+  dependencies: [ gio, glib, gobject, gstreamer_pbutils, gtk, libxml ],
+  install: 'true',
+  link_args: ['-export-dynamic'],
+)
diff --git a/widgets/meson.build b/widgets/meson.build
new file mode 100644
index 0000000..4a11f2a
--- /dev/null
+++ b/widgets/meson.build
@@ -0,0 +1,90 @@
+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 = [
+  'rb-alert-dialog.c',
+  'rb-entry-view.c',
+  'rb-property-view.c',
+  'rb-search-entry.c',
+  'rb-search-entry.h',
+  'rb-header.c',
+  'rb-header.h',
+  'rb-dialog.c',
+  'rb-cell-renderer-pixbuf.c',
+  'rb-cell-renderer-rating.c',
+  'gossip-cell-renderer-expander.c',
+  'gossip-cell-renderer-expander.h',
+  'rb-song-info.c',
+  'rb-rating.c',
+  'rb-rating-helper.c',
+  'rb-segmented-bar.c',
+  'rb-library-browser.c',
+  'rb-rating-helper.h',
+  'rb-query-creator.c',
+  'rb-query-creator.h',
+  'rb-query-creator-private.h',
+  'rb-query-creator-properties.c',
+  'rb-uri-dialog.c',
+  'eggwrapbox.c',
+  'eggwrapbox.h',
+  'eggwrapbox-enums.c',
+  'eggwrapbox-enums.h',
+  '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'
+]
+
+rb_c_args = [
+  '-DGNOMELOCALEDIR="' + get_option('datadir') + '/locale"',
+  '-DG_LOG_DOMAIN="Rhythmbox"',
+]
+
+
+librbwidgets = static_library('rbwidgets', widget_sources,
+  c_args: rb_c_args,
+  include_directories: [
+    configinc, backendsinc, libinc, metadatainc, rhythmdbinc, shellinc,
+    sourcesinc
+  ],
+  dependencies: [
+    gstreamer, gstreamer_pbutils, gtk, libnotify, libsoup, libxml
+  ],
+  install: 'true',
+  link_args: ['-export-dynamic'],
+  link_with: [librb, librhythmdb]
+)
+
+# These are interactive UI tests.
+
+test_rb_segmented_bar = executable('test-rb-segmented-bar', 'test-rb-segmented-bar.c',
+  dependencies: [gtk],
+  link_with: librbwidgets)
+
+test_uri_dialog = executable('test-uri-dialog', 'test-uri-dialog.c',
+  dependencies: [gtk],
+  include_directories: [libinc],
+  link_with: [librb, librbwidgets])



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