[grilo-plugins] build: add Meson build support
- From: Juan A. Suárez Romero <jasuarez src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [grilo-plugins] build: add Meson build support
- Date: Mon, 6 Feb 2017 08:59:45 +0000 (UTC)
commit ea047c4fb63e90268eb795ed91a09a2be5068a4c
Author: Juan A. Suarez Romero <jasuarez igalia com>
Date: Sun Dec 11 19:48:22 2016 +0100
build: add Meson build support
https://bugzilla.gnome.org/show_bug.cgi?id=775957
help/examples/meson.build | 18 ++++
help/meson.build | 15 ++++
meson.build | 148 +++++++++++++++++++++++++++++++++
meson_options.txt | 23 +++++
po/meson.build | 55 ++++++++++++
src/bookmarks/meson.build | 29 +++++++
src/chromaprint/meson.build | 27 ++++++
src/dleyna/meson.build | 52 ++++++++++++
src/dmap/meson.build | 63 ++++++++++++++
src/filesystem/meson.build | 27 ++++++
src/flickr/meson.build | 31 +++++++
src/freebox/meson.build | 33 +++++++
src/gravatar/meson.build | 27 ++++++
src/jamendo/meson.build | 27 ++++++
src/local-metadata/meson.build | 27 ++++++
src/lua-factory/meson.build | 70 ++++++++++++++++
src/lua-factory/sources/meson.build | 52 ++++++++++++
src/magnatune/meson.build | 27 ++++++
src/meson.build | 14 +++
src/metadata-store/meson.build | 27 ++++++
src/opensubtitles/meson.build | 27 ++++++
src/optical-media/meson.build | 27 ++++++
src/podcasts/meson.build | 27 ++++++
src/raitv/meson.build | 31 +++++++
src/shoutcast/meson.build | 27 ++++++
src/thetvdb/meson.build | 31 +++++++
src/tmdb/meson.build | 29 +++++++
src/tracker/meson.build | 40 +++++++++
src/vimeo/meson.build | 33 +++++++
src/youtube/meson.build | 31 +++++++
tests/chromaprint/meson.build | 26 ++++++
tests/dleyna/meson.build | 34 ++++++++
tests/games/meson.build | 22 +++++
tests/local-metadata/meson.build | 21 +++++
tests/lua-factory/meson.build | 31 +++++++
tests/lua-factory/sources/meson.build | 45 ++++++++++
tests/meson.build | 41 +++++++++
tests/spotify-cover/meson.build | 22 +++++
tests/thetvdb/meson.build | 28 ++++++
tests/tmdb/meson.build | 30 +++++++
tests/vimeo/meson.build | 21 +++++
41 files changed, 1416 insertions(+), 0 deletions(-)
---
diff --git a/help/examples/meson.build b/help/examples/meson.build
new file mode 100644
index 0000000..d1cbcd2
--- /dev/null
+++ b/help/examples/meson.build
@@ -0,0 +1,18 @@
+#
+# meson.build
+#
+# Author: Juan A. Suarez Romero <jasuarez igalia com>
+#
+# Copyright (C) 2016 Igalia S.L. All rights reserved.
+
+examples = [
+ 'example-tmdb'
+]
+
+foreach e: examples
+ source = e + '.c'
+ executable(e,
+ source,
+ install: false,
+ dependencies: must_deps)
+endforeach
diff --git a/help/meson.build b/help/meson.build
new file mode 100644
index 0000000..c9f877e
--- /dev/null
+++ b/help/meson.build
@@ -0,0 +1,15 @@
+#
+# meson.build
+#
+# Author: Juan A. Suarez Romero <jasuarez igalia com>
+#
+# Copyright (C) 2016 Igalia S.L. All rights reserved.
+
+gnome.yelp(meson.project_name(),
+ sources: [
+ 'grilo-plugins.xml',
+ 'legal.xml',
+ ],
+ media: ['../examples/example-tmdb.c'])
+
+subdir('examples')
diff --git a/meson.build b/meson.build
new file mode 100644
index 0000000..5d55013
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,148 @@
+#
+# meson.build
+#
+# Author: Juan A. Suarez Romero <jasuarez igalia com>
+#
+# Copyright (C) 2016 Igalia S.L. All rights reserved.
+
+project('grilo-plugins', 'c',
+ version: '0.3.4',
+ default_options: [
+ 'buildtype=debugoptimized',
+ 'c_std=gnu99',
+ 'warning_level=1'
+ ],
+ license: 'LGPL 2.1',
+ meson_version: '>= 0.36.0')
+
+plugin_version = meson.project_version()
+version_array = plugin_version.split('.')
+grl_major = version_array[0]
+grl_minor = version_array[1]
+
+prefix = get_option('prefix')
+localedir = join_paths(prefix, get_option('localedir'))
+libdir = get_option('libdir')
+pluginsdir =join_paths(libdir, 'grilo-@0@.@1@'.format(grl_major, grl_minor))
+
+glib_dep = dependency('glib-2.0', version: '>= 2.34', required: true)
+gmodule_dep = dependency('gmodule-2.0', required: true)
+gobject_dep = dependency('gobject-2.0', required: true)
+grilo_dep = dependency('grilo-0.3', version: '>= 0.3.1', required: true)
+
+avahi_client_dep = dependency('avahi-client', required: false)
+avahi_glib_dep = dependency('avahi-glib', required: false)
+avahi_gobject_dep = dependency('avahi-gobject', required: false)
+gio_dep = dependency('gio-2.0', required: false)
+gio_unix_dep = dependency('gio-unix-2.0', required: false)
+gmime_dep = dependency('gmime-2.6', required: false)
+goa_dep = dependency('goa-1.0', version: '>= 3.17.91', required: false)
+gom_dep = dependency('gom-1.0', version: '>= 0.3.2', required: false)
+grilo_net_dep = dependency('grilo-net-0.3', version: '>= 0.3.0', required: false)
+grilo_pls_dep = dependency('grilo-pls-0.3', version: '>= 0.3.0', required: false)
+gstreamer_dep = dependency('gstreamer-1.0', required: false)
+gthread_dep = dependency('gthread-2.0', required: false)
+json_glib_dep = dependency('json-glib-1.0', required: false)
+libarchive_dep = dependency('libarchive', required: false)
+libdmapsharing_dep = dependency('libdmapsharing-3.0', version: '>= 2.9.12', required: false)
+libgdata_dep = dependency('libgdata', version: '>= 0.9.1', required: false)
+libmediaart_dep = dependency('libmediaart-2.0', required: false)
+libsoup_dep = dependency('libsoup-2.4', required: false)
+libxml_dep = dependency('libxml-2.0', required: false)
+oauth_dep = dependency('oauth', required: false)
+sqlite3_dep = dependency('sqlite3', required: false)
+totem_plparser_dep = dependency('totem-plparser', version: '>= 3.4.1', required: false)
+totem_plparser_mini_dep = dependency('totem-plparser-mini', version: '>= 3.4.1', required: false)
+tracker_sparql_dep = dependency('tracker-sparql-1.0', required: false)
+
+lua_dep = dependency('lua', version: '>= 5.3.0', required: false)
+if not lua_dep.found()
+ lua_dep = dependency('lua5.3', version: '>= 5.3.0', required: false)
+endif
+
+gperf = find_program('gperf', required: false)
+glib_compile_resources = find_program('glib-compile-resources', required: false)
+
+must_deps = [glib_dep, gmodule_dep, gobject_dep, grilo_dep]
+
+cdata = configuration_data()
+cdata.set('GRL_MAJOR', grl_major)
+cdata.set('GRL_MINOR', grl_minor)
+cdata.set_quoted('GETTEXT_PACKAGE', meson.project_name())
+cdata.set_quoted('LOCALEDIR', localedir)
+cdata.set_quoted('VERSION', plugin_version)
+
+NAME = 0
+DEPS = 1
+
+plugins = [ # NAME, DEPS
+ ['bookmarks', [gio_dep, libxml_dep, gom_dep]],
+ ['chromaprint', [gstreamer_dep]],
+ ['dleyna', [gio_dep, gio_unix_dep, libsoup_dep]],
+ ['dmap', [libdmapsharing_dep, libxml_dep]],
+ ['filesystem', [grilo_pls_dep]],
+ ['flickr', [grilo_net_dep, libxml_dep, oauth_dep]],
+ ['freebox', [grilo_pls_dep, avahi_client_dep, avahi_glib_dep, avahi_gobject_dep]],
+ ['gravatar', []],
+ ['jamendo', [grilo_net_dep, libxml_dep]],
+ ['local-metadata', [gio_dep, libmediaart_dep]],
+ ['lua-factory', [lua_dep, libarchive_dep, grilo_net_dep, json_glib_dep, libxml_dep]],
+ ['magnatune', [sqlite3_dep, grilo_net_dep]],
+ ['metadata-store', [sqlite3_dep]],
+ ['opensubtitles', [gio_dep, libsoup_dep]],
+ ['optical-media', [totem_plparser_dep]],
+ ['podcasts', [grilo_net_dep, libxml_dep, sqlite3_dep, gmime_dep]],
+ ['raitv', [grilo_net_dep, libxml_dep]],
+ ['shoutcast', [grilo_net_dep, libxml_dep]],
+ ['thetvdb', [grilo_net_dep, libxml_dep, libarchive_dep, gom_dep]],
+ ['tmdb', [json_glib_dep, libsoup_dep, grilo_net_dep]],
+ ['tracker', [tracker_sparql_dep]],
+ ['vimeo', [grilo_net_dep, libxml_dep, totem_plparser_dep]],
+ ['youtube', [grilo_net_dep, libxml_dep, libgdata_dep, totem_plparser_dep]],
+]
+
+idx = 0
+foreach p: plugins
+ varname = p[NAME].underscorify()
+ varname_enabled = varname + '_enabled'
+ varname_idx = varname + '_idx'
+
+ current_enabled = get_option('enable-' + p[NAME]) == 'no' ? false : true
+ current_deps = p[DEPS]
+ if current_enabled
+ current_auto = get_option('enable-'+ p[NAME]) == 'auto'
+ foreach d: current_deps
+ if current_auto
+ current_enabled = current_enabled and d.found()
+ elif not d.found()
+ error('Missing dependencies for @0@ plugin'.format(p[NAME]))
+ endif
+ endforeach
+ endif
+ set_variable(varname_enabled, current_enabled)
+ set_variable(varname_idx, idx)
+ cdata.set_quoted(varname.to_upper() + '_PLUGIN_ID', 'grl-' + p[NAME])
+ idx = idx + 1
+endforeach
+
+# Special case: Lua Factory requires gperf program
+if lua_factory_enabled
+ if get_option('enable-lua-factory') == 'auto'
+ lua_factory_enabled = lua_factory_enabled and gperf.found() and glib_compile_resources.found()
+ elif not gperf.found() or glib_compile_resources.found()
+ error('Missing dependencies for lua-factory plugin')
+ endif
+endif
+
+message('Plugins:')
+foreach p: plugins
+ name = p[NAME].underscorify() + '_enabled'
+ message(' @0@ : @1@'.format(p[NAME], get_variable(name).to_string('yes', 'no')))
+endforeach
+
+gnome = import('gnome')
+
+subdir('src')
+subdir('help')
+subdir('po')
+subdir('tests')
diff --git a/meson_options.txt b/meson_options.txt
new file mode 100644
index 0000000..7d96a74
--- /dev/null
+++ b/meson_options.txt
@@ -0,0 +1,23 @@
+option('enable-bookmarks', type: 'combo', choices: [ 'auto', 'yes', 'no' ], value: 'auto', description:
'Enable Bookmarks plugin')
+option('enable-chromaprint', type: 'combo', choices: [ 'auto', 'yes', 'no' ], value: 'auto', description:
'Enable Chromaprint plugin')
+option('enable-dleyna', type: 'combo', choices: [ 'auto', 'yes', 'no' ], value: 'auto', description: 'Enable
dLeyna plugin')
+option('enable-dmap', type: 'combo', choices: [ 'auto', 'yes', 'no' ], value: 'auto', description: 'Enable
DMAP plugin')
+option('enable-filesystem', type: 'combo', choices: [ 'auto', 'yes', 'no' ], value: 'auto', description:
'Enable Filesystem plugin')
+option('enable-flickr', type: 'combo', choices: [ 'auto', 'yes', 'no' ], value: 'auto', description: 'Enable
Flickr plugin')
+option('enable-freebox', type: 'combo', choices: [ 'auto', 'yes', 'no' ], value: 'auto', description:
'Enable Freebox plugin')
+option('enable-gravatar', type: 'combo', choices: [ 'auto', 'yes', 'no' ], value: 'auto', description:
'Enable Gravatar plugin')
+option('enable-jamendo', type: 'combo', choices: [ 'auto', 'yes', 'no' ], value: 'auto', description:
'Enable Jamendo plugin')
+option('enable-local-metadata', type: 'combo', choices: [ 'auto', 'yes', 'no' ], value: 'auto', description:
'Enable Local Metadata plugin')
+option('enable-lua-factory', type: 'combo', choices: [ 'auto', 'yes', 'no' ], value: 'auto', description:
'Enable Lua Factory plugin')
+option('enable-magnatune', type: 'combo', choices: [ 'auto', 'yes', 'no' ], value: 'auto', description:
'Enable Magnatune plugin')
+option('enable-metadata-store', type: 'combo', choices: [ 'auto', 'yes', 'no' ], value: 'auto', description:
'Enable Metadata Store plugin')
+option('enable-opensubtitles', type: 'combo', choices: [ 'auto', 'yes', 'no' ], value: 'auto', description:
'Enable Opensubtitles plugin')
+option('enable-optical-media', type: 'combo', choices: [ 'auto', 'yes', 'no' ], value: 'auto', description:
'Enable Optical Media plugin')
+option('enable-podcasts', type: 'combo', choices: [ 'auto', 'yes', 'no' ], value: 'auto', description:
'Enable Podcasts plugin')
+option('enable-raitv', type: 'combo', choices: [ 'auto', 'yes', 'no' ], value: 'auto', description: 'Enable
Rai.tvplugin')
+option('enable-shoutcast', type: 'combo', choices: [ 'auto', 'yes', 'no' ], value: 'auto', description:
'Enable Shoutcast plugin')
+option('enable-thetvdb', type: 'combo', choices: [ 'auto', 'yes', 'no' ], value: 'auto', description:
'Enable Thetvdb plugin')
+option('enable-tmdb', type: 'combo', choices: [ 'auto', 'yes', 'no' ], value: 'auto', description: 'Enable
TMDb plugin')
+option('enable-tracker', type: 'combo', choices: [ 'auto', 'yes', 'no' ], value: 'auto', description:
'Enable Tracker plugin')
+option('enable-vimeo', type: 'combo', choices: [ 'auto', 'yes', 'no' ], value: 'auto', description: 'Enable
Vimeo plugin')
+option('enable-youtube', type: 'combo', choices: [ 'auto', 'yes', 'no' ], value: 'auto', description:
'Enable YouTube plugin')
diff --git a/po/meson.build b/po/meson.build
new file mode 100644
index 0000000..ecb3495
--- /dev/null
+++ b/po/meson.build
@@ -0,0 +1,55 @@
+#
+# meson.build
+#
+# Author: Juan A. Suarez Romero <jasuarez igalia com>
+#
+# Copyright (C) 2016 Igalia S.L. All rights reserved.
+
+i18n = import('i18n')
+
+langs = [
+ 'as',
+ 'bg',
+ 'bs',
+ 'ca',
+ 'ca@valencia',
+ 'cs',
+ 'da',
+ 'de',
+ 'el',
+ 'en_GB',
+ 'eo',
+ 'es',
+ 'eu',
+ 'fr',
+ 'fur',
+ 'gl',
+ 'he',
+ 'hu',
+ 'id',
+ 'it',
+ 'ja',
+ 'ko',
+ 'lt',
+ 'lv',
+ 'ml',
+ 'nb',
+ 'oc',
+ 'pl',
+ 'pt',
+ 'pt_BR',
+ 'ru',
+ 'sk',
+ 'sl',
+ 'sr',
+ 'sr@latin',
+ 'sv',
+ 'tr',
+ 'uk',
+ 'zh_CN',
+ 'zh_HK',
+ 'zh_TW',
+]
+
+i18n.gettext(meson.project_name(),
+ languages: langs)
diff --git a/src/bookmarks/meson.build b/src/bookmarks/meson.build
new file mode 100644
index 0000000..43f38cc
--- /dev/null
+++ b/src/bookmarks/meson.build
@@ -0,0 +1,29 @@
+#
+# meson.build
+#
+# Author: Juan A. Suarez Romero <jasuarez igalia com>
+#
+# Copyright (C) 2016 Igalia S.L. All rights reserved.
+
+bookmarks_sources = [
+ 'bookmarks-resource.c',
+ 'bookmarks-resource.h',
+ 'grl-bookmarks.c',
+ 'grl-bookmarks.h',
+]
+
+configure_file(output: 'config.h',
+ configuration: cdata)
+
+shared_library('grlbookmarks',
+ sources: bookmarks_sources,
+ install: true,
+ install_dir: pluginsdir,
+ dependencies: must_deps + plugins[bookmarks_idx][DEPS],
+ c_args: [
+ '-DG_LOG_DOMAIN="GrlBookmarks"',
+ '-DHAVE_CONFIG_H',
+ ],
+ link_args: [
+ '-Wl,--no-undefined',
+ ])
diff --git a/src/chromaprint/meson.build b/src/chromaprint/meson.build
new file mode 100644
index 0000000..d9a69b5
--- /dev/null
+++ b/src/chromaprint/meson.build
@@ -0,0 +1,27 @@
+#
+# meson.build
+#
+# Author: Juan A. Suarez Romero <jasuarez igalia com>
+#
+# Copyright (C) 2016 Igalia S.L. All rights reserved.
+
+chromaprint_sources = [
+ 'grl-chromaprint.c',
+ 'grl-chromaprint.h',
+]
+
+configure_file(output: 'config.h',
+ configuration: cdata)
+
+shared_library('grlchromaprint',
+ sources: chromaprint_sources,
+ install: true,
+ install_dir: pluginsdir,
+ dependencies: must_deps + plugins[chromaprint_idx][DEPS],
+ c_args: [
+ '-DG_LOG_DOMAIN="GrlChromaprint"',
+ '-DHAVE_CONFIG_H',
+ ],
+ link_args: [
+ '-Wl,--no-undefined',
+ ])
diff --git a/src/dleyna/meson.build b/src/dleyna/meson.build
new file mode 100644
index 0000000..6e24b37
--- /dev/null
+++ b/src/dleyna/meson.build
@@ -0,0 +1,52 @@
+#
+# meson.build
+#
+# Author: Juan A. Suarez Romero <jasuarez igalia com>
+#
+# Copyright (C) 2016 Igalia S.L. All rights reserved.
+
+dleyna_proxy_mediaserver2 = gnome.gdbus_codegen('grl-dleyna-proxy-mediaserver2',
+ 'org.gnome.UPnP.MediaServer2.xml',
+ namespace: 'GrlDleyna',
+ interface_prefix: 'org.gnome.UPnP.')
+
+dleyna_proxy_manager = gnome.gdbus_codegen('grl-dleyna-proxy-manager',
+ 'com.intel.dLeynaServer.Manager.xml',
+ namespace: 'GrlDleyna',
+ interface_prefix: 'com.intel.dLeynaServer.')
+
+dleyna_proxy_mediadevice = gnome.gdbus_codegen('grl-dleyna-proxy-mediadevice',
+ 'com.intel.dLeynaServer.MediaDevice.xml',
+ namespace: 'GrlDleyna',
+ interface_prefix: 'com.intel.dLeynaServer.')
+
+dleyna_sources = [
+ 'grl-dleyna-server.c',
+ 'grl-dleyna-server.h',
+ 'grl-dleyna-servers-manager.c',
+ 'grl-dleyna-servers-manager.h',
+ 'grl-dleyna-source.c',
+ 'grl-dleyna-source.h',
+ 'grl-dleyna-utils.c',
+ 'grl-dleyna-utils.h',
+ 'grl-dleyna.c',
+]
+
+configure_file(output: 'config.h',
+ configuration: cdata)
+
+shared_library('grldleyna',
+ sources: dleyna_sources + [dleyna_proxy_mediaserver2, dleyna_proxy_manager, dleyna_proxy_mediadevice],
+ install: true,
+ install_dir: pluginsdir,
+ dependencies: must_deps + plugins[dleyna_idx][DEPS],
+ include_directories: include_directories([
+ meson.build_root(),
+ ]),
+ c_args: [
+ '-DG_LOG_DOMAIN="GrlDleyna"',
+ '-DHAVE_CONFIG_H',
+ ],
+ link_args: [
+ '-Wl,--no-undefined',
+ ])
diff --git a/src/dmap/meson.build b/src/dmap/meson.build
new file mode 100644
index 0000000..66b4aa8
--- /dev/null
+++ b/src/dmap/meson.build
@@ -0,0 +1,63 @@
+#
+# meson.build
+#
+# Author: Juan A. Suarez Romero <jasuarez igalia com>
+#
+# Copyright (C) 2016 Igalia S.L. All rights reserved.
+
+daap_sources = [
+ 'grl-common.c',
+ 'grl-common.h',
+ 'grl-daap-db.c',
+ 'grl-daap-db.h',
+ 'grl-daap-record-factory.c',
+ 'grl-daap-record-factory.h',
+ 'grl-daap-record.c',
+ 'grl-daap-record.h',
+ 'grl-daap.c',
+ 'grl-daap.h',
+]
+
+dpap_sources = [
+ 'grl-common.c',
+ 'grl-common.h',
+ 'grl-dpap-db.c',
+ 'grl-dpap-db.h',
+ 'grl-dpap-record-factory.c',
+ 'grl-dpap-record-factory.h',
+ 'grl-dpap-record.c',
+ 'grl-dpap-record.h',
+ 'grl-dpap.c',
+ 'grl-dpap.h',
+]
+
+configure_file(output: 'config.h',
+ configuration: cdata)
+
+shared_library('grldaap',
+ sources: daap_sources,
+ install: true,
+ install_dir: pluginsdir,
+ dependencies: must_deps + plugins[dmap_idx][DEPS],
+ c_args: [
+ '-DDAAP_PLUGIN_ID=DMAP_PLUGIN_ID',
+ '-DG_LOG_DOMAIN="GrlDmap"',
+ '-DHAVE_CONFIG_H',
+ ],
+ link_args: [
+ '-Wl,--no-undefined',
+ ])
+
+shared_library('grldpap',
+ sources: dpap_sources,
+ install: true,
+ install_dir: pluginsdir,
+ dependencies: must_deps + plugins[dmap_idx][DEPS],
+ c_args: [
+ '-DDPAP_PLUGIN_ID=DMAP_PLUGIN_ID',
+ '-DG_LOG_DOMAIN="GrlDmap"',
+ '-DHAVE_CONFIG_H',
+ ],
+ link_args: [
+ '-Wl,--no-undefined',
+ ])
diff --git a/src/filesystem/meson.build b/src/filesystem/meson.build
new file mode 100644
index 0000000..0e7aeec
--- /dev/null
+++ b/src/filesystem/meson.build
@@ -0,0 +1,27 @@
+#
+# meson.build
+#
+# Author: Juan A. Suarez Romero <jasuarez igalia com>
+#
+# Copyright (C) 2016 Igalia S.L. All rights reserved.
+
+filesystem_sources = [
+ 'grl-filesystem.c',
+ 'grl-filesystem.h',
+]
+
+configure_file(output: 'config.h',
+ configuration: cdata)
+
+shared_library('grlfilesystem',
+ sources: filesystem_sources,
+ install: true,
+ install_dir: pluginsdir,
+ dependencies: must_deps + plugins[filesystem_idx][DEPS],
+ c_args: [
+ '-DG_LOG_DOMAIN="GrlFilesystem"',
+ '-DHAVE_CONFIG_H',
+ ],
+ link_args: [
+ '-Wl,--no-undefined',
+ ])
diff --git a/src/flickr/meson.build b/src/flickr/meson.build
new file mode 100644
index 0000000..fd38cd5
--- /dev/null
+++ b/src/flickr/meson.build
@@ -0,0 +1,31 @@
+#
+# meson.build
+#
+# Author: Juan A. Suarez Romero <jasuarez igalia com>
+#
+# Copyright (C) 2016 Igalia S.L. All rights reserved.
+
+flickr_sources = [
+ 'flickr-oauth.c',
+ 'flickr-oauth.h',
+ 'gflickr.c',
+ 'gflickr.h',
+ 'grl-flickr.c',
+ 'grl-flickr.h',
+]
+
+configure_file(output: 'config.h',
+ configuration: cdata)
+
+shared_library('grlflickr',
+ sources: flickr_sources,
+ install: true,
+ install_dir: pluginsdir,
+ dependencies: must_deps + plugins[flickr_idx][DEPS],
+ c_args: [
+ '-DG_LOG_DOMAIN="GrlFlickr"',
+ '-DHAVE_CONFIG_H',
+ ],
+ link_args: [
+ '-Wl,--no-undefined',
+ ])
diff --git a/src/freebox/meson.build b/src/freebox/meson.build
new file mode 100644
index 0000000..744ffe7
--- /dev/null
+++ b/src/freebox/meson.build
@@ -0,0 +1,33 @@
+#
+# meson.build
+#
+# Author: Juan A. Suarez Romero <jasuarez igalia com>
+#
+# Copyright (C) 2016 Igalia S.L. All rights reserved.
+
+freebox_resources = gnome.compile_resources('freeboxresources',
+ 'freebox.gresource.xml',
+ c_name: '_grl_freebox')
+
+freebox_sources = [
+ 'freebox-monitor.c',
+ 'freebox-monitor.h',
+ 'grl-freebox.c',
+ 'grl-freebox.h',
+]
+
+configure_file(output: 'config.h',
+ configuration: cdata)
+
+shared_library('grlfreebox',
+ sources: freebox_sources + freebox_resources,
+ install: true,
+ install_dir: pluginsdir,
+ dependencies: must_deps + plugins[freebox_idx][DEPS],
+ c_args: [
+ '-DG_LOG_DOMAIN="GrlFreebox"',
+ '-DHAVE_CONFIG_H',
+ ],
+ link_args: [
+ '-Wl,--no-undefined',
+ ])
diff --git a/src/gravatar/meson.build b/src/gravatar/meson.build
new file mode 100644
index 0000000..f016680
--- /dev/null
+++ b/src/gravatar/meson.build
@@ -0,0 +1,27 @@
+#
+# meson.build
+#
+# Author: Juan A. Suarez Romero <jasuarez igalia com>
+#
+# Copyright (C) 2016 Igalia S.L. All rights reserved.
+
+gravatar_sources = [
+ 'grl-gravatar.c',
+ 'grl-gravatar.h',
+]
+
+configure_file(output: 'config.h',
+ configuration: cdata)
+
+shared_library('grlgravatar',
+ sources: gravatar_sources,
+ install: true,
+ install_dir: pluginsdir,
+ dependencies: must_deps + plugins[gravatar_idx][DEPS],
+ c_args: [
+ '-DG_LOG_DOMAIN="GrlGravatar"',
+ '-DHAVE_CONFIG_H',
+ ],
+ link_args: [
+ '-Wl,--no-undefined',
+ ])
diff --git a/src/jamendo/meson.build b/src/jamendo/meson.build
new file mode 100644
index 0000000..b774f80
--- /dev/null
+++ b/src/jamendo/meson.build
@@ -0,0 +1,27 @@
+#
+# meson.build
+#
+# Author: Juan A. Suarez Romero <jasuarez igalia com>
+#
+# Copyright (C) 2016 Igalia S.L. All rights reserved.
+
+jamendo_sources = [
+ 'grl-jamendo.c',
+ 'grl-jamendo.h',
+]
+
+configure_file(output: 'config.h',
+ configuration: cdata)
+
+shared_library('grljamendo',
+ sources: jamendo_sources,
+ install: true,
+ install_dir: pluginsdir,
+ dependencies: must_deps + plugins[jamendo_idx][DEPS],
+ c_args: [
+ '-DG_LOG_DOMAIN="GrlJamendo"',
+ '-DHAVE_CONFIG_H',
+ ],
+ link_args: [
+ '-Wl,--no-undefined',
+ ])
diff --git a/src/local-metadata/meson.build b/src/local-metadata/meson.build
new file mode 100644
index 0000000..84bb412
--- /dev/null
+++ b/src/local-metadata/meson.build
@@ -0,0 +1,27 @@
+#
+# meson.build
+#
+# Author: Juan A. Suarez Romero <jasuarez igalia com>
+#
+# Copyright (C) 2016 Igalia S.L. All rights reserved.
+
+local_metadata_sources = [
+ 'grl-local-metadata.c',
+ 'grl-local-metadata.h',
+]
+
+configure_file(output: 'config.h',
+ configuration: cdata)
+
+shared_library('grllocalmetadata',
+ sources: local_metadata_sources,
+ install: true,
+ install_dir: pluginsdir,
+ dependencies: must_deps + plugins[local_metadata_idx][DEPS],
+ c_args: [
+ '-DG_LOG_DOMAIN="GrlLocalMetadata"',
+ '-DHAVE_CONFIG_H',
+ ],
+ link_args: [
+ '-Wl,--no-undefined',
+ ])
diff --git a/src/lua-factory/meson.build b/src/lua-factory/meson.build
new file mode 100644
index 0000000..7afaa15
--- /dev/null
+++ b/src/lua-factory/meson.build
@@ -0,0 +1,70 @@
+#
+# meson.build
+#
+# Author: Juan A. Suarez Romero <jasuarez igalia com>
+#
+# Copyright (C) 2016 Igalia S.L. All rights reserved.
+
+lua_factory_resources = gnome.compile_resources('luafactoryresources',
+ 'grl-lua-factory.gresource.xml',
+ c_name: '_grl_lua_factory')
+
+lua_factory_sources = [
+ 'grl-lua-common.h',
+ 'grl-lua-factory.c',
+ 'grl-lua-factory.h',
+ 'grl-lua-library-operations.c',
+ 'grl-lua-library-operations.h',
+ 'grl-lua-library.c',
+ 'grl-lua-library.h',
+]
+
+lua_library_sources = [
+ 'lua-library/lua-json.c',
+ 'lua-library/lua-xml.c',
+ 'lua-library/lua-libraries.h',
+]
+
+gperf_gen = generator(gperf,
+ output: '@BASENAME@.c',
+ arguments: [
+ '--struct-type',
+ '-l',
+ '-N', 'html_entity_hash',
+ '-L', 'ANSI-C',
+ '--output-file', '@OUTPUT@',
+ '@INPUT@',
+ ])
+
+htmlentity_c = gperf_gen.process(
+ 'lua-library/htmlentity.gperf')
+
+htmlentity_h = configure_file(input: 'lua-library/htmlentity.h',
+ output: 'htmlentity.h',
+ configuration: configuration_data())
+
+lua_library_sources += [
+ htmlentity_c,
+ htmlentity_h,
+]
+
+configure_file(output: 'config.h',
+ configuration: cdata)
+
+luafactorydir = join_paths(get_option('datadir'), 'grilo-plugins', 'grl-lua-factory')
+
+shared_library('grlluafactory',
+ sources: lua_factory_sources + lua_factory_resources + lua_library_sources,
+ install: true,
+ install_dir: pluginsdir,
+ dependencies: must_deps + plugins[lua_factory_idx][DEPS],
+ c_args: [
+ '-DG_LOG_DOMAIN="GrlLuaFactory"',
+ '-DHAVE_CONFIG_H',
+ '-DLUA_FACTORY_SOURCE_LOCATION="@0@"'.format(luafactorydir),
+ ],
+ link_args: [
+ '-Wl,--no-undefined',
+ ])
+
+subdir('sources')
diff --git a/src/lua-factory/sources/meson.build b/src/lua-factory/sources/meson.build
new file mode 100644
index 0000000..b212a99
--- /dev/null
+++ b/src/lua-factory/sources/meson.build
@@ -0,0 +1,52 @@
+#
+# meson.build
+#
+# Author: Juan A. Suarez Romero <jasuarez igalia com>
+#
+# Copyright (C) 2016 Igalia S.L. All rights reserved.
+
+sources = [
+ 'grl-acoustid',
+ 'grl-appletrailers',
+ 'grl-euronews',
+ 'grl-guardianvideos',
+ 'grl-itunes-podcast',
+ 'grl-lastfm-cover',
+ 'grl-metrolyrics',
+ 'grl-musicbrainz',
+ 'grl-pocket',
+ 'grl-radiofrance',
+ 'grl-spotify-cover',
+ 'grl-thegamesdb',
+ 'grl-video-title-parsing',
+]
+
+resources = [
+ 'grl-euronews',
+ 'grl-guardianvideos',
+ 'grl-radiofrance',
+ 'grl-pocket',
+ 'grl-appletrailers',
+ 'grl-itunes-podcast',
+]
+
+foreach s: sources
+ f = s + '.lua'
+ install_data(f,
+ install_dir: luafactorydir)
+endforeach
+
+foreach r: resources
+ input = r + '.gresource.xml'
+ output = r + '.gresource'
+ custom_target(output,
+ output: output,
+ input: input,
+ install: true,
+ install_dir: luafactorydir,
+ command: [glib_compile_resources,
+ '--sourcedir', meson.current_source_dir(),
+ '--target', '@OUTPUT@',
+ '@INPUT@'
+ ])
+endforeach
diff --git a/src/magnatune/meson.build b/src/magnatune/meson.build
new file mode 100644
index 0000000..9152eef
--- /dev/null
+++ b/src/magnatune/meson.build
@@ -0,0 +1,27 @@
+#
+# meson.build
+#
+# Author: Juan A. Suarez Romero <jasuarez igalia com>
+#
+# Copyright (C) 2016 Igalia S.L. All rights reserved.
+
+magnatune_sources = [
+ 'grl-magnatune.c',
+ 'grl-magnatune.h',
+]
+
+configure_file(output: 'config.h',
+ configuration: cdata)
+
+shared_library('grlmagnatune',
+ sources: magnatune_sources,
+ install: true,
+ install_dir: pluginsdir,
+ dependencies: must_deps + plugins[magnatune_idx][DEPS],
+ c_args: [
+ '-DG_LOG_DOMAIN="GrlMagnatune"',
+ '-DHAVE_CONFIG_H',
+ ],
+ link_args: [
+ '-Wl,--no-undefined',
+ ])
diff --git a/src/meson.build b/src/meson.build
new file mode 100644
index 0000000..84e469e
--- /dev/null
+++ b/src/meson.build
@@ -0,0 +1,14 @@
+#
+# meson.build
+#
+# Author: Juan A. Suarez Romero <jasuarez igalia com>
+#
+# Copyright (C) 2016 Igalia S.L. All rights reserved.
+
+foreach p: plugins
+ name = p[NAME].underscorify()
+ name_enabled = name + '_enabled'
+ if get_variable(name_enabled)
+ subdir(p[NAME])
+ endif
+endforeach
diff --git a/src/metadata-store/meson.build b/src/metadata-store/meson.build
new file mode 100644
index 0000000..7d46433
--- /dev/null
+++ b/src/metadata-store/meson.build
@@ -0,0 +1,27 @@
+#
+# meson.build
+#
+# Author: Juan A. Suarez Romero <jasuarez igalia com>
+#
+# Copyright (C) 2016 Igalia S.L. All rights reserved.
+
+metadata_store_sources = [
+ 'grl-metadata-store.c',
+ 'grl-metadata-store.h',
+]
+
+configure_file(output: 'config.h',
+ configuration: cdata)
+
+shared_library('grlmetadatastore',
+ sources: metadata_store_sources,
+ install: true,
+ install_dir: pluginsdir,
+ dependencies: must_deps + plugins[metadata_store_idx][DEPS],
+ c_args: [
+ '-DG_LOG_DOMAIN="GrlMetadataStore"',
+ '-DHAVE_CONFIG_H',
+ ],
+ link_args: [
+ '-Wl,--no-undefined',
+ ])
diff --git a/src/opensubtitles/meson.build b/src/opensubtitles/meson.build
new file mode 100644
index 0000000..b995649
--- /dev/null
+++ b/src/opensubtitles/meson.build
@@ -0,0 +1,27 @@
+#
+# meson.build
+#
+# Author: Juan A. Suarez Romero <jasuarez igalia com>
+#
+# Copyright (C) 2016 Igalia S.L. All rights reserved.
+
+opensubtitles_sources = [
+ 'grl-opensubtitles.c',
+ 'grl-opensubtitles.h',
+]
+
+configure_file(output: 'config.h',
+ configuration: cdata)
+
+shared_library('grlopensubtitles',
+ sources: opensubtitles_sources,
+ install: true,
+ install_dir: pluginsdir,
+ dependencies: must_deps + plugins[opensubtitles_idx][DEPS],
+ c_args: [
+ '-DG_LOG_DOMAIN="GrlOpenSubtitles"',
+ '-DHAVE_CONFIG_H',
+ ],
+ link_args: [
+ '-Wl,--no-undefined',
+ ])
diff --git a/src/optical-media/meson.build b/src/optical-media/meson.build
new file mode 100644
index 0000000..48d32c6
--- /dev/null
+++ b/src/optical-media/meson.build
@@ -0,0 +1,27 @@
+#
+# meson.build
+#
+# Author: Juan A. Suarez Romero <jasuarez igalia com>
+#
+# Copyright (C) 2016 Igalia S.L. All rights reserved.
+
+optical_media_sources = [
+ 'grl-optical-media.c',
+ 'grl-optical-media.h',
+]
+
+configure_file(output: 'config.h',
+ configuration: cdata)
+
+shared_library('grlopticalmedia',
+ sources: optical_media_sources,
+ install: true,
+ install_dir: pluginsdir,
+ dependencies: must_deps + plugins[optical_media_idx][DEPS],
+ c_args: [
+ '-DG_LOG_DOMAIN="GrlOpticalMedia"',
+ '-DHAVE_CONFIG_H',
+ ],
+ link_args: [
+ '-Wl,--no-undefined',
+ ])
diff --git a/src/podcasts/meson.build b/src/podcasts/meson.build
new file mode 100644
index 0000000..0e0b636
--- /dev/null
+++ b/src/podcasts/meson.build
@@ -0,0 +1,27 @@
+#
+# meson.build
+#
+# Author: Juan A. Suarez Romero <jasuarez igalia com>
+#
+# Copyright (C) 2016 Igalia S.L. All rights reserved.
+
+podcasts_sources = [
+ 'grl-podcasts.c',
+ 'grl-podcasts.h',
+]
+
+configure_file(output: 'config.h',
+ configuration: cdata)
+
+shared_library('grlpodcasts',
+ sources: podcasts_sources,
+ install: true,
+ install_dir: pluginsdir,
+ dependencies: must_deps + plugins[podcasts_idx][DEPS],
+ c_args: [
+ '-DG_LOG_DOMAIN="GrlPodcasts"',
+ '-DHAVE_CONFIG_H',
+ ],
+ link_args: [
+ '-Wl,--no-undefined',
+ ])
diff --git a/src/raitv/meson.build b/src/raitv/meson.build
new file mode 100644
index 0000000..18b689f
--- /dev/null
+++ b/src/raitv/meson.build
@@ -0,0 +1,31 @@
+#
+# meson.build
+#
+# Author: Juan A. Suarez Romero <jasuarez igalia com>
+#
+# Copyright (C) 2016 Igalia S.L. All rights reserved.
+
+raitv_resources = gnome.compile_resources('raitvresources',
+ 'raitv.gresource.xml',
+ c_name: '_grl_raitv')
+
+raitv_sources = [
+ 'grl-raitv.c',
+ 'grl-raitv.h',
+]
+
+configure_file(output: 'config.h',
+ configuration: cdata)
+
+shared_library('grlraitv',
+ sources: raitv_sources + raitv_resources,
+ install: true,
+ install_dir: pluginsdir,
+ dependencies: must_deps + plugins[raitv_idx][DEPS],
+ c_args: [
+ '-DG_LOG_DOMAIN="GrlRaitv"',
+ '-DHAVE_CONFIG_H',
+ ],
+ link_args: [
+ '-Wl,--no-undefined',
+ ])
diff --git a/src/shoutcast/meson.build b/src/shoutcast/meson.build
new file mode 100644
index 0000000..04d6953
--- /dev/null
+++ b/src/shoutcast/meson.build
@@ -0,0 +1,27 @@
+#
+# meson.build
+#
+# Author: Juan A. Suarez Romero <jasuarez igalia com>
+#
+# Copyright (C) 2016 Igalia S.L. All rights reserved.
+
+shoutcast_sources = [
+ 'grl-shoutcast.c',
+ 'grl-shoutcast.h',
+]
+
+configure_file(output: 'config.h',
+ configuration: cdata)
+
+shared_library('grlshoutcast',
+ sources: shoutcast_sources,
+ install: true,
+ install_dir: pluginsdir,
+ dependencies: must_deps + plugins[shoutcast_idx][DEPS],
+ c_args: [
+ '-DG_LOG_DOMAIN="GrlShoutcast"',
+ '-DHAVE_CONFIG_H',
+ ],
+ link_args: [
+ '-Wl,--no-undefined',
+ ])
diff --git a/src/thetvdb/meson.build b/src/thetvdb/meson.build
new file mode 100644
index 0000000..f286b28
--- /dev/null
+++ b/src/thetvdb/meson.build
@@ -0,0 +1,31 @@
+#
+# meson.build
+#
+# Author: Juan A. Suarez Romero <jasuarez igalia com>
+#
+# Copyright (C) 2016 Igalia S.L. All rights reserved.
+
+thetvdb_sources = [
+ 'grl-thetvdb.c',
+ 'grl-thetvdb.h',
+ 'thetvdb-resources-episodes.c',
+ 'thetvdb-resources-fuzzy-names.c',
+ 'thetvdb-resources-series.c',
+ 'thetvdb-resources.h',
+]
+
+configure_file(output: 'config.h',
+ configuration: cdata)
+
+shared_library('grlthetvdb',
+ sources: thetvdb_sources,
+ install: true,
+ install_dir: pluginsdir,
+ dependencies: must_deps + plugins[thetvdb_idx][DEPS],
+ c_args: [
+ '-DG_LOG_DOMAIN="GrlTheTVDB"',
+ '-DHAVE_CONFIG_H',
+ ],
+ link_args: [
+ '-Wl,--no-undefined',
+ ])
diff --git a/src/tmdb/meson.build b/src/tmdb/meson.build
new file mode 100644
index 0000000..b54a324
--- /dev/null
+++ b/src/tmdb/meson.build
@@ -0,0 +1,29 @@
+#
+# meson.build
+#
+# Author: Juan A. Suarez Romero <jasuarez igalia com>
+#
+# Copyright (C) 2016 Igalia S.L. All rights reserved.
+
+tmdb_sources = [
+ 'grl-tmdb-request.c',
+ 'grl-tmdb-request.h',
+ 'grl-tmdb.c',
+ 'grl-tmdb.h',
+]
+
+configure_file(output: 'config.h',
+ configuration: cdata)
+
+shared_library('grltmdb',
+ sources: tmdb_sources,
+ install: true,
+ install_dir: pluginsdir,
+ dependencies: must_deps + plugins[tmdb_idx][DEPS],
+ c_args: [
+ '-DG_LOG_DOMAIN="GrlTmdb"',
+ '-DHAVE_CONFIG_H',
+ ],
+ link_args: [
+ '-Wl,--no-undefined',
+ ])
diff --git a/src/tracker/meson.build b/src/tracker/meson.build
new file mode 100644
index 0000000..5603115
--- /dev/null
+++ b/src/tracker/meson.build
@@ -0,0 +1,40 @@
+#
+# meson.build
+#
+# Author: Juan A. Suarez Romero <jasuarez igalia com>
+#
+# Copyright (C) 2016 Igalia S.L. All rights reserved.
+
+tracker_sources = [
+ 'grl-tracker-request-queue.c',
+ 'grl-tracker-request-queue.h',
+ 'grl-tracker-source-api.c',
+ 'grl-tracker-source-api.h',
+ 'grl-tracker-source-cache.c',
+ 'grl-tracker-source-cache.h',
+ 'grl-tracker-source-notif.c',
+ 'grl-tracker-source-notif.h',
+ 'grl-tracker-source-priv.h',
+ 'grl-tracker-source.c',
+ 'grl-tracker-source.h',
+ 'grl-tracker-utils.c',
+ 'grl-tracker-utils.h',
+ 'grl-tracker.c',
+ 'grl-tracker.h',
+]
+
+configure_file(output: 'config.h',
+ configuration: cdata)
+
+shared_library('grltracker',
+ sources: tracker_sources,
+ install: true,
+ install_dir: pluginsdir,
+ dependencies: must_deps + plugins[tracker_idx][DEPS],
+ c_args: [
+ '-DG_LOG_DOMAIN="GrlTracker"',
+ '-DHAVE_CONFIG_H',
+ ],
+ link_args: [
+ '-Wl,--no-undefined',
+ ])
diff --git a/src/vimeo/meson.build b/src/vimeo/meson.build
new file mode 100644
index 0000000..5917bf5
--- /dev/null
+++ b/src/vimeo/meson.build
@@ -0,0 +1,33 @@
+#
+# meson.build
+#
+# Author: Juan A. Suarez Romero <jasuarez igalia com>
+#
+# Copyright (C) 2016 Igalia S.L. All rights reserved.
+
+vimeo_resources = gnome.compile_resources('vimeoresources',
+ 'vimeo.gresource.xml',
+ c_name: '_grl_vimeo')
+
+vimeo_sources = [
+ 'grl-vimeo.c',
+ 'grl-vimeo.h',
+ 'gvimeo.c',
+ 'gvimeo.h',
+]
+
+configure_file(output: 'config.h',
+ configuration: cdata)
+
+shared_library('grlvimeo',
+ sources: vimeo_sources + vimeo_resources,
+ install: true,
+ install_dir: pluginsdir,
+ dependencies: must_deps + plugins[vimeo_idx][DEPS],
+ c_args: [
+ '-DG_LOG_DOMAIN="GrlVimeo"',
+ '-DHAVE_CONFIG_H',
+ ],
+ link_args: [
+ '-Wl,--no-undefined',
+ ])
diff --git a/src/youtube/meson.build b/src/youtube/meson.build
new file mode 100644
index 0000000..a21fb1d
--- /dev/null
+++ b/src/youtube/meson.build
@@ -0,0 +1,31 @@
+#
+# meson.build
+#
+# Author: Juan A. Suarez Romero <jasuarez igalia com>
+#
+# Copyright (C) 2016 Igalia S.L. All rights reserved.
+
+youtube_resources = gnome.compile_resources('youtuberesources',
+ 'youtube.gresource.xml',
+ c_name: '_grl_youtube')
+
+youtube_sources = [
+ 'grl-youtube.c',
+ 'grl-youtube.h',
+]
+
+configure_file(output: 'config.h',
+ configuration: cdata)
+
+shared_library('grlyoutube',
+ sources: youtube_sources + youtube_resources,
+ install: true,
+ install_dir: pluginsdir,
+ dependencies: must_deps + plugins[youtube_idx][DEPS],
+ c_args: [
+ '-DG_LOG_DOMAIN="GrlYoutube"',
+ '-DHAVE_CONFIG_H',
+ ],
+ link_args: [
+ '-Wl,--no-undefined',
+ ])
diff --git a/tests/chromaprint/meson.build b/tests/chromaprint/meson.build
new file mode 100644
index 0000000..51180d8
--- /dev/null
+++ b/tests/chromaprint/meson.build
@@ -0,0 +1,26 @@
+#
+# meson.build
+#
+# Author: Juan A. Suarez Romero <jasuarez igalia com>
+#
+# Copyright (C) 2016 Igalia S.L. All rights reserved.
+
+source_tests = [
+ 'test_chromaprint_resolve',
+]
+
+source_common = [
+ 'test_chromaprint_utils.c',
+ 'test_chromaprint_utils.h',
+]
+
+foreach t: source_tests
+ exe = executable(t, [t + '.c'] + source_common,
+ install: false,
+ dependencies: must_deps,
+ c_args: [
+ '-DCHROMAPRINT_PLUGIN_PATH="@0@/src/chromaprint/"'.format(meson.build_root()),
+ '-DCHROMAPRINT_PLUGIN_TEST_DATA_PATH="@0@/data/"'.format(meson.current_source_dir()),
+ ])
+ test(t, exe)
+endforeach
diff --git a/tests/dleyna/meson.build b/tests/dleyna/meson.build
new file mode 100644
index 0000000..bf8eb41
--- /dev/null
+++ b/tests/dleyna/meson.build
@@ -0,0 +1,34 @@
+#
+# meson.build
+#
+# Author: Juan A. Suarez Romero <jasuarez igalia com>
+#
+# Copyright (C) 2016 Igalia S.L. All rights reserved.
+
+mock_conf = configuration_data()
+mock_conf.set('abs_top_srcdir', meson.source_root())
+
+configure_file(input: 'dbusmock/dleyna-server-mock.service.in',
+ output: 'dleyna-server-mock.service',
+ configuration: mock_conf)
+
+source_tests = [
+ 'test_dleyna',
+]
+
+source_common = [
+ 'test_dleyna_utils.c',
+ 'test_dleyna_utils.h',
+]
+
+foreach t: source_tests
+ exe = executable(t, [t + '.c'] + source_common,
+ install: false,
+ dependencies: must_deps,
+ c_args: [
+ '-DGRILO_PLUGINS_TESTS_DLEYNA_DATA_PATH="@0@/data/"'.format(meson.current_source_dir()),
+ '-DGRILO_PLUGINS_TESTS_DLEYNA_PLUGIN_PATH="@0@/src/dleyna/"'.format(meson.build_root()),
+ '-DGRILO_PLUGINS_TESTS_DLEYNA_SERVICES_PATH="@0@/"'.format(meson.current_build_dir()),
+ ])
+ test(t, exe)
+endforeach
diff --git a/tests/games/meson.build b/tests/games/meson.build
new file mode 100644
index 0000000..e816de3
--- /dev/null
+++ b/tests/games/meson.build
@@ -0,0 +1,22 @@
+#
+# meson.build
+#
+# Author: Juan A. Suarez Romero <jasuarez igalia com>
+#
+# Copyright (C) 2016 Igalia S.L. All rights reserved.
+
+source_tests = [
+ 'test_games',
+]
+
+foreach t: source_tests
+ exe = executable(t, t + '.c',
+ install: false,
+ dependencies: must_deps,
+ c_args: [
+ '-DGAMES_DATA_PATH="@0@/data/"'.format(meson.current_source_dir()),
+ '-DLUA_FACTORY_PLUGIN_PATH="@0@/src/lua-factory/"'.format(meson.build_root()),
+ '-DLUA_SOURCES_PATH="@0@/src/lua-factory/sources/"'.format(meson.source_root()),
+ ])
+ test(t, exe)
+endforeach
diff --git a/tests/local-metadata/meson.build b/tests/local-metadata/meson.build
new file mode 100644
index 0000000..b7db88e
--- /dev/null
+++ b/tests/local-metadata/meson.build
@@ -0,0 +1,21 @@
+#
+# meson.build
+#
+# Author: Juan A. Suarez Romero <jasuarez igalia com>
+#
+# Copyright (C) 2016 Igalia S.L. All rights reserved.
+
+source_tests = [
+ 'test_local_metadata',
+]
+
+foreach t: source_tests
+ exe = executable(t, t + '.c',
+ install: false,
+ dependencies: must_deps,
+ c_args: [
+ '-DLUA_FACTORY_PLUGIN_PATH="@0@/src/lua-factory/"'.format(meson.build_root()),
+ '-DLUA_SOURCES_PATH="@0@/src/lua-factory/sources/"'.format(meson.source_root()),
+ ])
+ test(t, exe)
+endforeach
diff --git a/tests/lua-factory/meson.build b/tests/lua-factory/meson.build
new file mode 100644
index 0000000..f985689
--- /dev/null
+++ b/tests/lua-factory/meson.build
@@ -0,0 +1,31 @@
+#
+# meson.build
+#
+# Author: Juan A. Suarez Romero <jasuarez igalia com>
+#
+# Copyright (C) 2016 Igalia S.L. All rights reserved.
+
+resources = gnome.compile_resources('luafactorytestsresources',
+ 'test_lua_factory_tests.gresource.xml',
+ c_name: '_grl_lua_factory_tests')
+
+source_tests = [
+ 'test_lua_factory_grl_media',
+ 'test_lua_factory_source_errors',
+ 'test_lua_factory_xml_parser',
+]
+
+foreach t: source_tests
+ exe = executable(t, [t + '.c'] + resources,
+ install: false,
+ dependencies: must_deps + [json_glib_dep],
+ c_args: [
+ '-DLUA_FACTORY_DATA_PATH="@0@/data/"'.format(meson.current_source_dir()),
+ '-DLUA_FACTORY_PLUGIN_PATH="@0@/src/lua-factory/"'.format(meson.build_root()),
+ '-DLUA_FACTORY_PLUGIN_TEST_DATA_PATH="@0@/sources/"'.format(meson.current_build_dir()),
+ '-DLUA_FACTORY_SOURCES_PATH="@0@/src/lua-factory/sources/"'.format(meson.source_root()),
+ ])
+ test(t, exe)
+endforeach
+
+subdir('sources')
diff --git a/tests/lua-factory/sources/meson.build b/tests/lua-factory/sources/meson.build
new file mode 100644
index 0000000..010bc67
--- /dev/null
+++ b/tests/lua-factory/sources/meson.build
@@ -0,0 +1,45 @@
+#
+# meson.build
+#
+# Author: Juan A. Suarez Romero <jasuarez igalia com>
+#
+# Copyright (C) 2016 Igalia S.L. All rights reserved.
+
+acoustid_resources = gnome.compile_resources('acoustidresources',
+ 'test_lua_acoustid.gresource.xml',
+ c_name: '_grl_lua_acoustid')
+
+metrolyrics_resources = gnome.compile_resources('metrolyricsresources',
+ 'test_lua_metrolyrics.gresource.xml',
+ c_name: '_grl_lua_metrolyrics')
+
+source_tests = [
+ 'test_lua_metrolyrics',
+]
+
+if chromaprint_enabled
+ source_tests += [
+ 'test_lua_acoustid',
+ ]
+endif
+
+source_common = [
+ 'test_lua_factory_utils.c',
+ 'test_lua_factory_utils.h',
+]
+
+resources = acoustid_resources + metrolyrics_resources
+
+foreach t: source_tests
+ exe = executable(t, [t + '.c'] + source_common + resources,
+ install: false,
+ dependencies: must_deps,
+ c_args: [
+ '-DCHROMAPRINT_PLUGIN_PATH="@0@/src/chromaprint/"'.format(meson.build_root()),
+ '-DLUA_FACTORY_PLUGIN_PATH="@0@/src/lua-factory/"'.format(meson.build_root()),
+ '-DLUA_FACTORY_PLUGIN_TEST_DATA_PATH="@0@/"'.format(meson.current_build_dir()),
+ '-DLUA_FACTORY_SOURCES_DATA_PATH="@0@/data/"'.format(meson.current_source_dir()),
+ '-DLUA_FACTORY_SOURCES_PATH="@0@/src/lua-factory/sources/"'.format(meson.source_root()),
+ ])
+ test(t, exe)
+endforeach
diff --git a/tests/meson.build b/tests/meson.build
new file mode 100644
index 0000000..861c23b
--- /dev/null
+++ b/tests/meson.build
@@ -0,0 +1,41 @@
+#
+# meson.build
+#
+# Author: Juan A. Suarez Romero <jasuarez igalia com>
+#
+# Copyright (C) 2016 Igalia S.L. All rights reserved.
+
+test_plugins = [
+ 'chromaprint',
+ # 'dleyna',
+ 'lua-factory',
+ 'thetvdb',
+ 'tmdb',
+ 'vimeo',
+]
+
+test_lua_sources = [
+ 'games',
+ 'spotify-cover',
+]
+
+# Plugins
+foreach p: test_plugins
+ name = p.underscorify()
+ name_enabled = name + '_enabled'
+ if get_variable(name_enabled)
+ subdir(p)
+ endif
+endforeach
+
+# Lua sources
+if lua_factory_enabled
+ foreach s: test_lua_sources
+ subdir(s)
+ endforeach
+endif
+
+# Special cases
+if local_metadata_enabled and lua_factory_enabled
+ subdir('local-metadata')
+endif
diff --git a/tests/spotify-cover/meson.build b/tests/spotify-cover/meson.build
new file mode 100644
index 0000000..0cb40c5
--- /dev/null
+++ b/tests/spotify-cover/meson.build
@@ -0,0 +1,22 @@
+#
+# meson.build
+#
+# Author: Juan A. Suarez Romero <jasuarez igalia com>
+#
+# Copyright (C) 2016 Igalia S.L. All rights reserved.
+
+source_tests = [
+ 'test_spotify_cover',
+]
+
+foreach t: source_tests
+ exe = executable(t, t + '.c',
+ install: false,
+ dependencies: must_deps,
+ c_args: [
+ '-DLUA_FACTORY_PLUGIN_PATH="@0@/src/lua-factory/"'.format(meson.build_root()),
+ '-DLUA_SOURCES_PATH="@0@/src/lua-factory/sources/"'.format(meson.source_root()),
+ '-DSPOTIFY_COVER_DATA_PATH="@0@/data/"'.format(meson.current_source_dir()),
+ ])
+ test(t, exe)
+endforeach
diff --git a/tests/thetvdb/meson.build b/tests/thetvdb/meson.build
new file mode 100644
index 0000000..dc1837d
--- /dev/null
+++ b/tests/thetvdb/meson.build
@@ -0,0 +1,28 @@
+#
+# meson.build
+#
+# Author: Juan A. Suarez Romero <jasuarez igalia com>
+#
+# Copyright (C) 2016 Igalia S.L. All rights reserved.
+
+source_tests = [
+ 'test_thetvdb_resolve_episodes',
+ 'test_thetvdb_resolve_shows',
+ 'test_thetvdb_resolve_stress',
+]
+
+source_common = [
+ 'test_thetvdb_utils.c',
+ 'test_thetvdb_utils.h',
+]
+
+foreach t: source_tests
+ exe = executable(t, [t + '.c'] + source_common,
+ install: false,
+ dependencies: must_deps,
+ c_args: [
+ '-DTHETVDB_PLUGIN_PATH="@0@/src/thetvdb/"'.format(meson.build_root()),
+ '-DTHETVDB_PLUGIN_TEST_DATA_PATH="@0@/data/"'.format(meson.current_source_dir()),
+ ])
+ test(t, exe)
+endforeach
diff --git a/tests/tmdb/meson.build b/tests/tmdb/meson.build
new file mode 100644
index 0000000..a69ecc7
--- /dev/null
+++ b/tests/tmdb/meson.build
@@ -0,0 +1,30 @@
+#
+# meson.build
+#
+# Author: Juan A. Suarez Romero <jasuarez igalia com>
+#
+# Copyright (C) 2016 Igalia S.L. All rights reserved.
+
+source_tests = [
+ 'test_tmdb_fast_resolution',
+ 'test_tmdb_fast_resolution_by_id',
+ 'test_tmdb_full_resolution',
+ 'test_tmdb_missing_configuration',
+ 'test_tmdb_preconditions',
+]
+
+source_common = [
+ 'test_tmdb_utils.c',
+ 'test_tmdb_utils.h',
+]
+
+foreach t: source_tests
+ exe = executable(t, [t + '.c'] + source_common,
+ install: false,
+ dependencies: must_deps,
+ c_args: [
+ '-DGRILO_PLUGINS_TESTS_TMDB_DATA_PATH="@0@/data/"'.format(meson.current_source_dir()),
+ '-DGRILO_PLUGINS_TESTS_TMDB_PLUGIN_PATH="@0@/src/tmdb/"'.format(meson.build_root()),
+ ])
+ test(t, exe)
+endforeach
diff --git a/tests/vimeo/meson.build b/tests/vimeo/meson.build
new file mode 100644
index 0000000..55f8e4d
--- /dev/null
+++ b/tests/vimeo/meson.build
@@ -0,0 +1,21 @@
+#
+# meson.build
+#
+# Author: Juan A. Suarez Romero <jasuarez igalia com>
+#
+# Copyright (C) 2016 Igalia S.L. All rights reserved.
+
+source_tests = [
+ 'test_vimeo',
+]
+
+foreach t: source_tests
+ exe = executable(t, t + '.c',
+ install: false,
+ dependencies: must_deps,
+ c_args: [
+ '-DVIMEO_DATA_PATH="@0@/data/"'.format(meson.current_source_dir()),
+ '-DVIMEO_PLUGIN_PATH="@0@/src/vimeo/"'.format(meson.build_root()),
+ ])
+ test(t, exe)
+endforeach
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]