[totem/wip/inigomartinez/meson-improve: 11/16] build: Improve plugins build files
- From: Iñigo Martínez <inigomartinez src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem/wip/inigomartinez/meson-improve: 11/16] build: Improve plugins build files
- Date: Wed, 21 Feb 2018 11:06:07 +0000 (UTC)
commit c5e18161c6ef0b26230898aa2b594f09f8cdd741
Author: Iñigo Martínez <inigomartinez gmail com>
Date: Mon Feb 19 19:35:35 2018 +0100
build: Improve plugins build files
The build files involved on plugins building and installation have
been improved. The description `plugin` file of each plugin is
created now at the `src/plugin` directory that simplifies the
build commands.
All dependencies has also been revised. Redundant dependencies have
been removed. Common dependencies, compiler arguments and included
directories have been now grouped under the same dependency.
Following the `subdir` -> `plugin name ` pattern, the `properties`
directory has been renamed to `movie-properties`. The `im-status`
plugin files have also been renamed to remove the `totem-` prefix.
Now, only the plugins passed from the command line are checked
because those are the ones that can only be error prone.
po/POTFILES.in | 6 +-
src/plugins/apple-trailers/meson.build | 23 +-----
src/plugins/autoload-subtitles/meson.build | 23 +-----
src/plugins/brasero-disc-recorder/meson.build | 28 ++-----
src/plugins/dbusservice/meson.build | 17 +----
src/plugins/gromit/meson.build | 23 +-----
...tem-im-status.plugin.in => im-status.plugin.in} | 0
src/plugins/im-status/meson.build | 23 +-----
src/plugins/lirc/meson.build | 28 ++-----
src/plugins/media-player-keys/meson.build | 25 +-----
src/plugins/meson.build | 88 +++++++++++--------
src/plugins/movie-properties/meson.build | 13 +++
.../movie-properties.plugin.in | 0
.../totem-movie-properties.c | 0
src/plugins/ontop/meson.build | 26 ++----
src/plugins/opensubtitles/meson.build | 31 ++-----
src/plugins/properties/meson.build | 27 ------
src/plugins/pythonconsole/meson.build | 31 ++-----
src/plugins/recent/meson.build | 23 +-----
src/plugins/rotation/meson.build | 47 +++--------
src/plugins/sample-vala/meson.build | 32 ++------
src/plugins/samplepython/meson.build | 23 +-----
src/plugins/save-file/meson.build | 26 +-----
src/plugins/screensaver/meson.build | 26 ++----
src/plugins/screenshot/meson.build | 41 +++-------
src/plugins/skipto/meson.build | 34 ++------
src/plugins/variable-rate/meson.build | 23 +-----
src/plugins/vimeo/meson.build | 23 +-----
src/plugins/zeitgeist-dp/meson.build | 44 +++-------
29 files changed, 191 insertions(+), 563 deletions(-)
---
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 689df1f..fd14fb9 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -44,18 +44,18 @@ src/plugins/brasero-disc-recorder/totem-disc-recorder.c
src/plugins/dbusservice/dbusservice.py
[type: gettext/ini]src/plugins/gromit/gromit.plugin.in
src/plugins/gromit/totem-gromit.c
+[type: gettext/ini]src/plugins/im-status/im-status.plugin.in
src/plugins/im-status/totem-im-status.c
-[type: gettext/ini]src/plugins/im-status/totem-im-status.plugin.in
[type: gettext/ini]src/plugins/lirc/lirc.plugin.in
src/plugins/lirc/totem-lirc.c
[type: gettext/ini]src/plugins/media-player-keys/media-player-keys.plugin.in
+[type: gettext/ini]src/plugins/movie-properties/movie-properties.plugin.in
+src/plugins/movie-properties/totem-movie-properties.c
[type: gettext/ini]src/plugins/ontop/ontop.plugin.in
[type: gettext/ini]src/plugins/opensubtitles/opensubtitles.plugin.in
src/plugins/opensubtitles/opensubtitles.py
[type: gettext/glade]src/plugins/opensubtitles/opensubtitles.ui
[type: gettext/gsettings]src/plugins/opensubtitles/org.gnome.totem.plugins.opensubtitles.gschema.xml.in
-[type: gettext/ini]src/plugins/properties/movie-properties.plugin.in
-src/plugins/properties/totem-movie-properties.c
[type: gettext/gsettings]src/plugins/pythonconsole/org.gnome.totem.plugins.pythonconsole.gschema.xml.in
[type: gettext/ini]src/plugins/pythonconsole/pythonconsole.plugin.in
src/plugins/pythonconsole/pythonconsole.py
diff --git a/src/plugins/apple-trailers/meson.build b/src/plugins/apple-trailers/meson.build
index 1ee6c71..8b3d225 100644
--- a/src/plugins/apple-trailers/meson.build
+++ b/src/plugins/apple-trailers/meson.build
@@ -1,24 +1,7 @@
-plugin_name = 'apple-trailers'
-
-plugin_dir = join_paths(totem_pluginsdir, plugin_name)
-
shared_module(
- plugin_name,
- sources: 'totem-' + plugin_name + '.c',
- include_directories: plugins_incs,
- dependencies: plugins_deps,
- c_args: plugins_cflags,
- install: true,
- install_dir: plugin_dir
-)
-
-plugin_data = plugin_name + '.plugin'
-
-custom_target(
- plugin_data,
- input: plugin_data + '.in',
- output: plugin_data,
- command: intltool_desktop_cmd,
+ plugin,
+ sources: 'totem-@0@.c'.format(plugin),
+ dependencies: plugins_dep,
install: true,
install_dir: plugin_dir
)
diff --git a/src/plugins/autoload-subtitles/meson.build b/src/plugins/autoload-subtitles/meson.build
index 8d64dc2..8b3d225 100644
--- a/src/plugins/autoload-subtitles/meson.build
+++ b/src/plugins/autoload-subtitles/meson.build
@@ -1,24 +1,7 @@
-plugin_name = 'autoload-subtitles'
-
-plugin_dir = join_paths(totem_pluginsdir, plugin_name)
-
shared_module(
- plugin_name,
- sources: 'totem-' + plugin_name + '.c',
- include_directories: plugins_incs,
- dependencies: plugins_deps,
- c_args: plugins_cflags,
- install: true,
- install_dir: plugin_dir
-)
-
-plugin_data = plugin_name + '.plugin'
-
-custom_target(
- plugin_data,
- input: plugin_data + '.in',
- output: plugin_data,
- command: intltool_desktop_cmd,
+ plugin,
+ sources: 'totem-@0@.c'.format(plugin),
+ dependencies: plugins_dep,
install: true,
install_dir: plugin_dir
)
diff --git a/src/plugins/brasero-disc-recorder/meson.build b/src/plugins/brasero-disc-recorder/meson.build
index d328345..9d79ce0 100644
--- a/src/plugins/brasero-disc-recorder/meson.build
+++ b/src/plugins/brasero-disc-recorder/meson.build
@@ -1,27 +1,13 @@
-plugin_name = 'brasero-disc-recorder'
-
-plugin_dir = join_paths(totem_pluginsdir, plugin_name)
+deps = [
+ gtk_x11_dep,
+ libxml_dep,
+ plugins_dep
+]
shared_module(
- plugin_name,
+ plugin,
sources: 'totem-disc-recorder.c',
- include_directories: plugins_incs,
- dependencies: plugins_deps + [
- libxml_dep,
- gtk_x11_dep
- ],
- c_args: plugins_cflags,
- install: true,
- install_dir: plugin_dir
-)
-
-plugin_data = plugin_name + '.plugin'
-
-custom_target(
- plugin_data,
- input: plugin_data + '.in',
- output: plugin_data,
- command: intltool_desktop_cmd,
+ dependencies: deps,
install: true,
install_dir: plugin_dir
)
diff --git a/src/plugins/dbusservice/meson.build b/src/plugins/dbusservice/meson.build
index 0dc653f..daf1304 100644
--- a/src/plugins/dbusservice/meson.build
+++ b/src/plugins/dbusservice/meson.build
@@ -1,19 +1,4 @@
-plugin_name = 'dbusservice'
-
-plugin_dir = join_paths(totem_pluginsdir, 'dbus')
-
install_data(
- plugin_name + '.py',
- install_dir: plugin_dir
-)
-
-plugin_data = plugin_name + '.plugin'
-
-custom_target(
- plugin_data,
- input: plugin_data + '.in',
- output: plugin_data,
- command: intltool_desktop_cmd,
- install: true,
+ plugin + '.py',
install_dir: plugin_dir
)
diff --git a/src/plugins/gromit/meson.build b/src/plugins/gromit/meson.build
index 64057e8..8b3d225 100644
--- a/src/plugins/gromit/meson.build
+++ b/src/plugins/gromit/meson.build
@@ -1,24 +1,7 @@
-plugin_name = 'gromit'
-
-plugin_dir = join_paths(totem_pluginsdir, plugin_name)
-
shared_module(
- plugin_name,
- sources: 'totem-' + plugin_name + '.c',
- include_directories: plugins_incs,
- dependencies: plugins_deps,
- c_args: plugins_cflags,
- install: true,
- install_dir: plugin_dir
-)
-
-plugin_data = plugin_name + '.plugin'
-
-custom_target(
- plugin_data,
- input: plugin_data + '.in',
- output: plugin_data,
- command: intltool_desktop_cmd,
+ plugin,
+ sources: 'totem-@0@.c'.format(plugin),
+ dependencies: plugins_dep,
install: true,
install_dir: plugin_dir
)
diff --git a/src/plugins/im-status/totem-im-status.plugin.in b/src/plugins/im-status/im-status.plugin.in
similarity index 100%
rename from src/plugins/im-status/totem-im-status.plugin.in
rename to src/plugins/im-status/im-status.plugin.in
diff --git a/src/plugins/im-status/meson.build b/src/plugins/im-status/meson.build
index d691d4b..8b3d225 100644
--- a/src/plugins/im-status/meson.build
+++ b/src/plugins/im-status/meson.build
@@ -1,24 +1,7 @@
-plugin_name = 'totem-im-status'
-
-plugin_dir = join_paths(totem_pluginsdir, 'im-status')
-
shared_module(
- plugin_name,
- sources: plugin_name + '.c',
- include_directories: plugins_incs,
- dependencies: plugins_deps,
- c_args: plugins_cflags,
- install: true,
- install_dir: plugin_dir
-)
-
-plugin_data = plugin_name + '.plugin'
-
-custom_target(
- plugin_data,
- input: plugin_data + '.in',
- output: plugin_data,
- command: intltool_desktop_cmd,
+ plugin,
+ sources: 'totem-@0@.c'.format(plugin),
+ dependencies: plugins_dep,
install: true,
install_dir: plugin_dir
)
diff --git a/src/plugins/lirc/meson.build b/src/plugins/lirc/meson.build
index 0be0eeb..6e05f9b 100644
--- a/src/plugins/lirc/meson.build
+++ b/src/plugins/lirc/meson.build
@@ -1,26 +1,12 @@
-plugin_name = 'lirc'
-
-plugin_dir = join_paths(totem_pluginsdir, plugin_name)
+deps [
+ lirc_dep,
+ plugins_dep
+]
shared_module(
- plugin_name,
- sources: 'totem-' + plugin_name + '.c',
- include_directories: plugins_incs,
- dependencies: plugins_deps + [
- lirc_dep
- ],
- c_args: plugins_cflags,
- install: true,
- install_dir: plugin_dir
-)
-
-plugin_data = plugin_name + '.plugin'
-
-custom_target(
- plugin_data,
- input: plugin_data + '.in',
- output: plugin_data,
- command: intltool_desktop_cmd,
+ plugin,
+ sources: 'totem-@0@.c'.format(plugin),
+ dependencies: deps,
install: true,
install_dir: plugin_dir
)
diff --git a/src/plugins/media-player-keys/meson.build b/src/plugins/media-player-keys/meson.build
index 660b413..8b3d225 100644
--- a/src/plugins/media-player-keys/meson.build
+++ b/src/plugins/media-player-keys/meson.build
@@ -1,26 +1,7 @@
-plugin_name = 'media-player-keys'
-
-plugin_dir = join_paths(totem_pluginsdir, plugin_name)
-
shared_module(
- plugin_name.underscorify(),
- sources: 'totem-' + plugin_name + '.c',
- include_directories: plugins_incs,
- dependencies: plugins_deps + [
- gio_dep
- ],
- c_args: plugins_cflags,
- install: true,
- install_dir: plugin_dir
-)
-
-plugin_data = plugin_name + '.plugin'
-
-custom_target(
- plugin_data,
- input: plugin_data + '.in',
- output: plugin_data,
- command: intltool_desktop_cmd,
+ plugin,
+ sources: 'totem-@0@.c'.format(plugin),
+ dependencies: plugins_dep,
install: true,
install_dir: plugin_dir
)
diff --git a/src/plugins/meson.build b/src/plugins/meson.build
index d3eadc2..cd70282 100644
--- a/src/plugins/meson.build
+++ b/src/plugins/meson.build
@@ -1,28 +1,10 @@
-plugins_incs = [
- top_inc,
- plugins_inc
-]
-
-plugins_deps = [
- libbacon_video_widget_dep,
- libpeas_dep,
- libtotem_dep
-]
-
-plugins_cflags = common_flags + warn_flags + [
- '-DG_LOG_DOMAIN="Totem"'
-]
-
-plugins_conf = configuration_data()
-plugins_conf.set('GETTEXT_PACKAGE', meson.project_name())
-
base_plugins = [
'apple-trailers',
'autoload-subtitles',
'im-status',
'media-player-keys',
'ontop',
- 'properties',
+ 'movie-properties',
'recent',
'screensaver',
'screenshot',
@@ -38,15 +20,18 @@ lirc_plugins = ['lirc']
nautilus_plugins = ['save-file']
python_plugins = [
+ # FIXME: this should be installed to `dbus`
'dbusservice',
'opensubtitles',
'pythonconsole',
- 'samplepython'
+ # FIXME: disabled
+ #'samplepython',
]
vala_plugins = [
'rotation',
- 'sample-vala',
+ # FIXME: disabled
+ #'sample-vala',
'zeitgeist-dp'
]
@@ -55,18 +40,15 @@ x11_plugins = ['gromit']
allowed_plugins = base_plugins + brasero_plugins + lirc_plugins + nautilus_plugins + python_plugins +
vala_plugins + x11_plugins
if get_option('plugins_set') == 'all'
- enable_plugins = allowed_plugins
+ plugins = allowed_plugins
elif get_option('plugins_set') == 'base'
- enable_plugins = base_plugins
+ plugins = base_plugins
else
- enable_plugins = []
+ plugins = []
endif
-enable_plugins += get_option('plugins')
-
# Sanity check: Make sure enabled extensions are valid and also remove duplicates
-plugins = []
-foreach plugin: enable_plugins
+foreach plugin: get_option('plugins')
assert(allowed_plugins.contains(plugin), 'Invalid plugin: ' + plugin)
if not plugins.contains(plugin)
plugins += plugin
@@ -94,24 +76,31 @@ if plugins.contains('save-file')
assert(enable_nautilus, 'nautilus support required for the save-file plugin')
endif
-foreach plugin: python_plugins
- assert(enable_python or not plugins.contains(plugin), 'python support required for the ' + plugin + '
plugin')
-endforeach
+if enable_python
+ plugins_conf = configuration_data()
+ plugins_conf.set('GETTEXT_PACKAGE', meson.project_name())
+else
+ foreach plugin: python_plugins
+ assert(not plugins.contains(plugin), 'python support required for the ' + plugin + ' plugin')
+ endforeach
+endif
-foreach plugin: vala_plugins
- assert(enable_vapi or not plugins.contains(plugin), 'vala support required for the ' + plugin + ' plugin')
-endforeach
+if not enable_vapi
+ foreach plugin: vala_plugins
+ assert(not plugins.contains(plugin), 'vala support required for the ' + plugin + ' plugin')
+ endforeach
+endif
if enable_vapi
- plugins_vala_deps = [declare_dependency(sources: libtotem_gir[0])]
+ vala_deps = [declare_dependency(sources: libtotem_gir[0])]
- plugins_vala_flags = [
+ vala_flags = [
'-Wno-unused-but-set-variable',
'-Wno-unused-function',
'-Wno-unused-variable'
]
- plugins_vala_args = [
+ vala_args = [
'--girdir=' + join_paths(meson.build_root(), 'src'),
'--pkg=@0@-@1@'.format(totem_gir_ns, totem_api_version)
]
@@ -124,6 +113,31 @@ if enable_vapi
endif
endif
+plugins_dep = declare_dependency(
+ include_directories: [
+ top_inc,
+ plugins_inc
+ ],
+ dependencies: [
+ libpeas_dep,
+ libtotem_dep
+ ],
+ compile_args: warn_flags + ['-DG_LOG_DOMAIN="Totem"']
+)
+
foreach plugin: plugins
+ plugin_dir = join_paths(totem_pluginsdir, plugin)
+
+ plugin_data = plugin + '.plugin'
+
+ custom_target(
+ plugin_data,
+ input: join_paths(plugin, plugin_data + '.in'),
+ output: plugin_data,
+ command: intltool_desktop_cmd,
+ install: true,
+ install_dir: plugin_dir
+ )
+
subdir(plugin)
endforeach
diff --git a/src/plugins/movie-properties/meson.build b/src/plugins/movie-properties/meson.build
new file mode 100644
index 0000000..d95f850
--- /dev/null
+++ b/src/plugins/movie-properties/meson.build
@@ -0,0 +1,13 @@
+deps = [
+ libbacon_video_widget_dep,
+ libbacon_video_widget_properties_dep,
+ plugins_dep
+]
+
+shared_module(
+ plugin,
+ sources: 'totem-@0@.c'.format(plugin),
+ dependencies: deps,
+ install: true,
+ install_dir: plugin_dir
+)
diff --git a/src/plugins/properties/movie-properties.plugin.in
b/src/plugins/movie-properties/movie-properties.plugin.in
similarity index 100%
rename from src/plugins/properties/movie-properties.plugin.in
rename to src/plugins/movie-properties/movie-properties.plugin.in
diff --git a/src/plugins/properties/totem-movie-properties.c
b/src/plugins/movie-properties/totem-movie-properties.c
similarity index 100%
rename from src/plugins/properties/totem-movie-properties.c
rename to src/plugins/movie-properties/totem-movie-properties.c
diff --git a/src/plugins/ontop/meson.build b/src/plugins/ontop/meson.build
index 54f32f5..62b98ab 100644
--- a/src/plugins/ontop/meson.build
+++ b/src/plugins/ontop/meson.build
@@ -1,24 +1,12 @@
-plugin_name = 'ontop'
-
-plugin_dir = join_paths(totem_pluginsdir, plugin_name)
+deps = [
+ libbacon_video_widget_dep,
+ plugins_dep
+]
shared_module(
- plugin_name,
- sources: 'totem-' + plugin_name + '.c',
- include_directories: plugins_incs,
- dependencies: plugins_deps,
- c_args: plugins_cflags,
- install: true,
- install_dir: plugin_dir
-)
-
-plugin_data = plugin_name + '.plugin'
-
-custom_target(
- plugin_data,
- input: plugin_data + '.in',
- output: plugin_data,
- command: intltool_desktop_cmd,
+ plugin,
+ sources: 'totem-@0@.c'.format(plugin),
+ dependencies: deps,
install: true,
install_dir: plugin_dir
)
diff --git a/src/plugins/opensubtitles/meson.build b/src/plugins/opensubtitles/meson.build
index f4692f4..46063c2 100644
--- a/src/plugins/opensubtitles/meson.build
+++ b/src/plugins/opensubtitles/meson.build
@@ -1,40 +1,25 @@
-plugin_name = 'opensubtitles'
-
-plugin_dir = join_paths(totem_pluginsdir, plugin_name)
-
-plugin_files = files(
- plugin_name + '.py',
+data_files = files(
'hash.py',
- plugin_name + '.ui'
+ plugin + '.py',
+ plugin + '.ui'
)
install_data(
- plugin_files,
- install_dir: plugin_dir
-)
-
-plugin_data = plugin_name + '.plugin'
-
-custom_target(
- plugin_data,
- input: plugin_data + '.in',
- output: plugin_data,
- command: intltool_desktop_cmd,
- install: true,
+ data_files,
install_dir: plugin_dir
)
-schema = 'org.gnome.totem.plugins.' + plugin_name + '.gschema.xml'
+schema = 'org.gnome.totem.plugins.' + plugin + '.gschema.xml'
configure_file(
input: schema + '.in',
output: schema,
+ configuration: plugins_conf,
install: true,
- install_dir: totem_schemadir,
- configuration: plugins_conf
+ install_dir: totem_schemadir
)
install_data(
- plugin_name + '.convert',
+ plugin + '.convert',
install_dir: join_paths(totem_datadir, 'GConf', 'gsettings')
)
diff --git a/src/plugins/pythonconsole/meson.build b/src/plugins/pythonconsole/meson.build
index e782e5b..f477817 100644
--- a/src/plugins/pythonconsole/meson.build
+++ b/src/plugins/pythonconsole/meson.build
@@ -1,39 +1,24 @@
-plugin_name = 'pythonconsole'
-
-plugin_dir = join_paths(totem_pluginsdir, plugin_name)
-
-plugin_files = files(
- plugin_name + '.py',
- 'console.py'
+data_files = files(
+ 'console.py',
+ plugin + '.py'
)
install_data(
- plugin_files,
- install_dir: plugin_dir
-)
-
-plugin_data = plugin_name + '.plugin'
-
-custom_target(
- plugin_data,
- input: plugin_data + '.in',
- output: plugin_data,
- command: intltool_desktop_cmd,
- install: true,
+ data_files,
install_dir: plugin_dir
)
-schema = 'org.gnome.totem.plugins.' + plugin_name + '.gschema.xml'
+schema = 'org.gnome.totem.plugins.' + plugin + '.gschema.xml'
configure_file(
input: schema + '.in',
output: schema,
+ configuration: plugins_conf,
install: true,
- install_dir: totem_schemadir,
- configuration: plugins_conf
+ install_dir: totem_schemadir
)
install_data(
- plugin_name + '.convert',
+ plugin + '.convert',
install_dir: join_paths(totem_datadir, 'GConf', 'gsettings')
)
diff --git a/src/plugins/recent/meson.build b/src/plugins/recent/meson.build
index c3d024f..8b3d225 100644
--- a/src/plugins/recent/meson.build
+++ b/src/plugins/recent/meson.build
@@ -1,24 +1,7 @@
-plugin_name = 'recent'
-
-plugin_dir = join_paths(totem_pluginsdir, plugin_name)
-
shared_module(
- plugin_name,
- sources: 'totem-' + plugin_name + '.c',
- include_directories: plugins_incs,
- dependencies: plugins_deps,
- c_args: plugins_cflags,
- install: true,
- install_dir: plugin_dir
-)
-
-plugin_data = plugin_name + '.plugin'
-
-custom_target(
- plugin_data,
- input: plugin_data + '.in',
- output: plugin_data,
- command: intltool_desktop_cmd,
+ plugin,
+ sources: 'totem-@0@.c'.format(plugin),
+ dependencies: plugins_dep,
install: true,
install_dir: plugin_dir
)
diff --git a/src/plugins/rotation/meson.build b/src/plugins/rotation/meson.build
index c5b15bc..bc6be93 100644
--- a/src/plugins/rotation/meson.build
+++ b/src/plugins/rotation/meson.build
@@ -1,43 +1,20 @@
-plugin_name = 'rotation'
-
-plugin_dir = join_paths(totem_pluginsdir, plugin_name)
-
-plugin_files = files(
- 'totem-' + plugin_name + '-plugin.vala',
- 'bacon-video.vapi'
+sources = files(
+ 'bacon-video.vapi',
+ 'totem-@0 -plugin vala'.format(plugin)
)
-plugin_deps = [
- gtk_dep,
- libpeas_dep,
- dependency('cogl-pango-1.0'),
- clutter_gtk_dep,
+deps = [
+ libbacon_video_widget_dep,
+ libpeas_dep
]
shared_module(
- plugin_name,
- sources: plugin_files,
- include_directories: plugins_incs + [
- backend_inc,
- src_inc
- ],
- dependencies: plugin_deps + plugins_vala_deps,
- c_args: plugins_cflags + plugins_vala_flags + [
- '--include=config.h'
- ],
- vala_args: plugins_vala_args,
- link_with: libtotem,
- install: true,
- install_dir: plugin_dir
-)
-
-plugin_data = plugin_name + '.plugin'
-
-custom_target(
- plugin_data,
- input: plugin_data + '.in',
- output: plugin_data,
- command: intltool_desktop_cmd,
+ plugin,
+ sources: sources,
+ include_directories: incs + [src_inc],
+ dependencies: deps + vala_deps,
+ c_args: cflags + vala_flags + ['--include=config.h'],
+ vala_args: vala_args,
install: true,
install_dir: plugin_dir
)
diff --git a/src/plugins/sample-vala/meson.build b/src/plugins/sample-vala/meson.build
index a8ed00a..130b4e1 100644
--- a/src/plugins/sample-vala/meson.build
+++ b/src/plugins/sample-vala/meson.build
@@ -1,32 +1,14 @@
-plugin_name = 'sample-vala'
-
-plugin_install = false
-
-plugin_dir = join_paths(totem_pluginsdir, plugin_name)
-
-plugin_deps = [
+deps = [
gtk_dep,
libpeas_dep
]
shared_module(
- plugin_name,
- sources: 'totem-' + plugin_name + '-plugin.vala',
- include_directories: plugins_incs,
- dependencies: plugin_deps + plugins_vala_deps,
- c_args: plugins_cflags + plugins_vala_flags,
- vala_args: plugins_vala_args,
- install: plugin_install,
- install_dir: plugin_dir
-)
-
-plugin_data = plugin_name + '.plugin'
-
-custom_target(
- plugin_data,
- input: plugin_data + '.in',
- output: plugin_data,
- command: intltool_desktop_cmd,
- install: plugin_install,
+ plugin,
+ sources: 'totem-@0 -plugin vala'.format(plugin),
+ dependencies: deps + vala_deps,
+ c_args: vala_flags,
+ vala_args: vala_args,
+ install: true,
install_dir: plugin_dir
)
diff --git a/src/plugins/samplepython/meson.build b/src/plugins/samplepython/meson.build
index bada009..daf1304 100644
--- a/src/plugins/samplepython/meson.build
+++ b/src/plugins/samplepython/meson.build
@@ -1,23 +1,4 @@
-plugin_name = 'samplepython'
-
-plugin_install = false
-
-plugin_dir = join_paths(totem_pluginsdir, 'sample-python')
-
-if plugin_install
- install_data(
- plugin_name + '.py',
- install_dir: plugin_dir
- )
-endif
-
-plugin_data = plugin_name + '.plugin'
-
-custom_target(
- plugin_data,
- input: plugin_data + '.in',
- output: plugin_data,
- command: intltool_desktop_cmd,
- install: plugin_install,
+install_data(
+ plugin + '.py',
install_dir: plugin_dir
)
diff --git a/src/plugins/save-file/meson.build b/src/plugins/save-file/meson.build
index 0ac157d..8b3d225 100644
--- a/src/plugins/save-file/meson.build
+++ b/src/plugins/save-file/meson.build
@@ -1,27 +1,7 @@
-plugin_name = 'save-file'
-
-plugin_dir = join_paths(totem_pluginsdir, plugin_name)
-
shared_module(
- plugin_name,
- sources: 'totem-' + plugin_name + '.c',
- include_directories: plugins_incs,
- dependencies: plugins_deps + [
- gio_dep,
- libnautilus_ext_dep
- ],
- c_args: plugins_cflags,
- install: true,
- install_dir: plugin_dir
-)
-
-plugin_data = plugin_name + '.plugin'
-
-custom_target(
- plugin_data,
- input: plugin_data + '.in',
- output: plugin_data,
- command: intltool_desktop_cmd,
+ plugin,
+ sources: 'totem-@0@.c'.format(plugin),
+ dependencies: plugins_dep,
install: true,
install_dir: plugin_dir
)
diff --git a/src/plugins/screensaver/meson.build b/src/plugins/screensaver/meson.build
index 5c398c7..62b98ab 100644
--- a/src/plugins/screensaver/meson.build
+++ b/src/plugins/screensaver/meson.build
@@ -1,24 +1,12 @@
-plugin_name = 'screensaver'
-
-plugin_dir = join_paths(totem_pluginsdir, plugin_name)
+deps = [
+ libbacon_video_widget_dep,
+ plugins_dep
+]
shared_module(
- plugin_name,
- sources: 'totem-' + plugin_name + '.c',
- include_directories: plugins_incs,
- dependencies: plugins_deps,
- c_args: plugins_cflags,
- install: true,
- install_dir: plugin_dir
-)
-
-plugin_data = plugin_name + '.plugin'
-
-custom_target(
- plugin_data,
- input: plugin_data + '.in',
- output: plugin_data,
- command: intltool_desktop_cmd,
+ plugin,
+ sources: 'totem-@0@.c'.format(plugin),
+ dependencies: deps,
install: true,
install_dir: plugin_dir
)
diff --git a/src/plugins/screenshot/meson.build b/src/plugins/screenshot/meson.build
index 70dcbb9..dffa215 100644
--- a/src/plugins/screenshot/meson.build
+++ b/src/plugins/screenshot/meson.build
@@ -1,44 +1,27 @@
-plugin_name = 'screenshot'
-
-plugin_dir = join_paths(totem_pluginsdir, plugin_name)
-
-plugin_files = files(
- 'totem-' + plugin_name + '-plugin.c',
+sources = files(
+ 'totem-@0@-plugin.c'.format(plugin),
'screenshot-filename-builder.c',
'totem-gallery.c',
'totem-gallery-progress.c'
)
+deps = [
+ libbacon_video_widget_dep,
+ plugins_dep
+]
+
test_cflags = [
'-Wno-error=format-nonliteral',
'-Wno-format-nonliteral'
]
-plugin_cflags = plugins_cflags
-
-foreach cflag: test_cflags
- if cc.has_argument(cflag)
- plugin_cflags += [cflag]
- endif
-endforeach
+cflags = cc.get_supported_arguments(test_cflags) + ['-DLIBEXECDIR="@0@"'.format(totem_libexecdir)]
shared_module(
- plugin_name,
- sources: plugin_files,
- include_directories: plugins_incs,
- dependencies: plugins_deps,
- c_args: plugin_cflags + ['-DLIBEXECDIR="@0@"'.format(totem_libexecdir)],
- install: true,
- install_dir: plugin_dir
-)
-
-plugin_data = plugin_name + '.plugin'
-
-custom_target(
- plugin_data,
- input: plugin_data + '.in',
- output: plugin_data,
- command: intltool_desktop_cmd,
+ plugin,
+ sources: sources,
+ dependencies: deps,
+ c_args: cflags,
install: true,
install_dir: plugin_dir
)
diff --git a/src/plugins/skipto/meson.build b/src/plugins/skipto/meson.build
index 948fb15..e78cb11 100644
--- a/src/plugins/skipto/meson.build
+++ b/src/plugins/skipto/meson.build
@@ -1,35 +1,17 @@
-plugin_name = 'skipto'
-
-plugin_dir = join_paths(totem_pluginsdir, plugin_name)
-
-plugin_files = files(
- 'totem-' + plugin_name + '-plugin.c',
- 'totem-time-entry.c',
- 'totem-' + plugin_name + '.c'
-)
+deps = [
+ libbacon_video_widget_dep,
+ plugins_dep
+]
shared_module(
- plugin_name,
- sources: plugin_files,
- include_directories: plugins_incs,
- dependencies: plugins_deps + [libtotem_time_helpers_dep],
- c_args: plugins_cflags,
- install: true,
- install_dir: plugin_dir
-)
-
-plugin_data = plugin_name + '.plugin'
-
-custom_target(
- plugin_data,
- input: plugin_data + '.in',
- output: plugin_data,
- command: intltool_desktop_cmd,
+ plugin,
+ sources: 'totem-@0@.c'.format(plugin),
+ dependencies: deps,
install: true,
install_dir: plugin_dir
)
install_data(
- plugin_name + '.ui',
+ plugin + '.ui',
install_dir: plugin_dir
)
diff --git a/src/plugins/variable-rate/meson.build b/src/plugins/variable-rate/meson.build
index 53761fb..8927a95 100644
--- a/src/plugins/variable-rate/meson.build
+++ b/src/plugins/variable-rate/meson.build
@@ -1,24 +1,7 @@
-plugin_name = 'variable-rate'
-
-plugin_dir = join_paths(totem_pluginsdir, plugin_name)
-
shared_module(
- plugin_name,
- sources: 'totem-' + plugin_name + '-plugin.c',
- include_directories: plugins_incs,
- dependencies: plugins_deps,
- c_args: plugins_cflags,
- install: true,
- install_dir: plugin_dir
-)
-
-plugin_data = plugin_name + '.plugin'
-
-custom_target(
- plugin_data,
- input: plugin_data + '.in',
- output: plugin_data,
- command: intltool_desktop_cmd,
+ plugin,
+ sources: 'totem-@0@-plugin.c'.format(plugin),
+ dependencies: plugins_dep,
install: true,
install_dir: plugin_dir
)
diff --git a/src/plugins/vimeo/meson.build b/src/plugins/vimeo/meson.build
index c89b16b..8b3d225 100644
--- a/src/plugins/vimeo/meson.build
+++ b/src/plugins/vimeo/meson.build
@@ -1,24 +1,7 @@
-plugin_name = 'vimeo'
-
-plugin_dir = join_paths(totem_pluginsdir, plugin_name)
-
shared_module(
- plugin_name,
- sources: 'totem-' + plugin_name + '.c',
- include_directories: plugins_incs,
- dependencies: plugins_deps,
- c_args: plugins_cflags,
- install: true,
- install_dir: plugin_dir
-)
-
-plugin_data = plugin_name + '.plugin'
-
-custom_target(
- plugin_data,
- input: plugin_data + '.in',
- output: plugin_data,
- command: intltool_desktop_cmd,
+ plugin,
+ sources: 'totem-@0@.c'.format(plugin),
+ dependencies: plugins_dep,
install: true,
install_dir: plugin_dir
)
diff --git a/src/plugins/zeitgeist-dp/meson.build b/src/plugins/zeitgeist-dp/meson.build
index 5d9ceac..1b2d195 100644
--- a/src/plugins/zeitgeist-dp/meson.build
+++ b/src/plugins/zeitgeist-dp/meson.build
@@ -1,43 +1,21 @@
-plugin_name = 'zeitgeist-dp'
-
-plugin_dir = join_paths(totem_pluginsdir, plugin_name)
-
-plugin_files = files(
- 'totem-' + plugin_name + '-plugin.vala',
- 'bacon-video.vapi'
+sources = files(
+ 'bacon-video.vapi',
+ 'totem-@0 -plugin vala'.format(plugin)
)
-plugin_deps = [
- clutter_gtk_dep,
- gtk_dep,
+deps = [
+ libbacon_video_widget_dep,
libpeas_dep,
zeitgeist_dep
]
shared_module(
- 'totem-' + plugin_name + '-plugin',
- sources: plugin_files,
- include_directories: plugins_incs + [
- backend_inc,
- src_inc
- ],
- dependencies: plugin_deps + plugins_vala_deps,
- c_args: plugins_cflags + plugins_vala_flags + [
- '--include=config.h'
- ],
- vala_args: plugins_vala_args,
- link_with: libtotem,
- install: true,
- install_dir: plugin_dir
-)
-
-plugin_data = plugin_name + '.plugin'
-
-custom_target(
- plugin_data,
- input: plugin_data + '.in',
- output: plugin_data,
- command: intltool_desktop_cmd,
+ 'totem-@0@-plugin'.format(plugin),
+ sources: sources,
+ include_directories: src_inc,
+ dependencies: deps + vala_deps,
+ c_args: vala_flags + ['--include=config.h'],
+ vala_args: vala_args,
install: true,
install_dir: plugin_dir
)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]