[rhythmbox/wip/sam/meson: 3/3] Work in progress: add Meson build instructions
- From: Sam Thursfield <sthursfield src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rhythmbox/wip/sam/meson: 3/3] Work in progress: add Meson build instructions
- Date: Tue, 13 Sep 2016 00:41:35 +0000 (UTC)
commit 8d8fbc4553c3d3a38516a35c4388a3df5ffaeba6
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.
data/meson.build | 8 +
lib/libmediaplayerid/meson.build | 31 +++
lib/meson.build | 60 ++++++
meson.build | 434 ++++++++++++++++++++++++++++++++++++++
meson_options.txt | 41 ++++
metadata/meson.build | 76 +++++++
rhythmdb/meson.build | 55 +++++
7 files changed, 705 insertions(+), 0 deletions(-)
---
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..8552dea
--- /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
+
+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..0bb9a11
--- /dev/null
+++ b/lib/meson.build
@@ -0,0 +1,60 @@
+subdir('libmediaplayerid')
+
+rb_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(rb_headers, subdir: 'rhythmbox/lib')
+
+rb_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'
+]
+
+rb_c_args = [
+ '-DGNOMELOCALEDIR="' + get_option('datadir') + '/locale"',
+ '-DG_LOG_DOMAIN="Rhythmbox"',
+ '-DSHARE_DIR="' + get_option('datadir') + '"',
+ '-DDATADIR="' + get_option('datadir') + '"'
+]
+
+
+librb = library('rb', rb_sources,
+ c_args: rb_c_args,
+ 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..b2f6afc
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,434 @@
+
+#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_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)
+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()
+
+# 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')
+ x11 = dependency('x11', required: true)
+ deps_rhythmbox = deps_rhythmbox + [x11]
+endif
+
+totem_plparser_uselibcamel = run_command(['pkg-config', '--variable', 'uselibcamel',
'totem-plparser']).stdout().strip()
+
+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.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'))
+
+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 = false#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
+ if cc.has_argument(option)
+ add_global_arguments(option, language: 'c')
+ endif
+ 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('.')
+libinc = include_directories('lib')
+metadatainc = include_directories('metadata')
+podcastinc = include_directories('podcast')
+widgetsinc = include_directories('widgets')
+
+subdir('data')
+subdir('lib')
+subdir('metadata')
+subdir('rhythmdb')
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..ae7e651
--- /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 = library('rbmetadata', metadata_sources,
+ link_with: librb,
+ dependencies: [glib, gtk, tdb],
+ include_directories: [configinc, libinc],
+ link_args: '-export-dynamic')
+
+# service
+
+librbmetadatasvc = library('rbmetadatasvc', metadata_service_sources,
+ link_with: librb,
+ dependencies: [glib, gobject, gstreamer, gstreamer_pbutils, gtk],
+ include_directories: [configinc, libinc])
+
+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/rhythmdb/meson.build b/rhythmdb/meson.build
new file mode 100644
index 0000000..3553e3c
--- /dev/null
+++ b/rhythmdb/meson.build
@@ -0,0 +1,55 @@
+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 = 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...
+ dependencies: [gio, glib, gobject, gstreamer, gtk, libmath, libxml, tdb],
+ include_directories: [configinc, libinc, metadatainc, podcastinc, widgetsinc],
+ link_args: '-export-dynamic',
+ link_with: librb)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]