diff options
author | Iñigo Martínez <inigomartinez@gmail.com> | 2018-02-03 11:30:06 +0100 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2018-02-05 17:42:49 +0100 |
commit | d5397729fc772a7223bc46c88876e9e9a85c5b76 (patch) | |
tree | f38517174e09efd662a00b9f4fcac74d4106fc67 /plugins/meson.build | |
parent | f06b1c3c9aa8e70e4b6d120a68f697956243dead (diff) | |
download | gnome-settings-daemon-d5397729fc772a7223bc46c88876e9e9a85c5b76.tar.gz |
build: Remove desktop generation duplicated commands
Every plugin generate an autostart desktop file, except `common`
and `dummy` that are special cases.
This desktop file generation is duplicated among the different
plugin's build files.
This code has been moved to the build file in the `plugins`
directory, avoiding any code duplication.
The downside of this is that meson is not able to generate files
in a different directory, so all the files will be generated in
the `plugin` directory, outside of the each plugin's directory.
This is something that it's worked on in a different feature and
it might be merged in the future.
See https://github.com/mesonbuild/meson/pull/2617
https://bugzilla.gnome.org/show_bug.cgi?id=793087
Diffstat (limited to 'plugins/meson.build')
-rw-r--r-- | plugins/meson.build | 52 |
1 files changed, 33 insertions, 19 deletions
diff --git a/plugins/meson.build b/plugins/meson.build index 6babd8ec..3db69da7 100644 --- a/plugins/meson.build +++ b/plugins/meson.build @@ -1,34 +1,34 @@ enabled_plugins = [ - 'a11y-settings', - 'clipboard', - 'color', - 'datetime', - 'dummy', - 'power', - 'housekeeping', - 'keyboard', - 'media-keys', - 'mouse', - 'screensaver-proxy', - 'sharing', - 'sound', - 'xsettings' + ['a11y-settings', 'A11ySettings'], + ['clipboard', 'Clipboard'], + ['color', 'Color'], + ['datetime', 'Datetime'], + ['dummy', ''], + ['power', 'Power'], + ['housekeeping', 'Housekeeping'], + ['keyboard', 'Keyboard'], + ['media-keys', 'MediaKeys'], + ['mouse', 'Mouse'], + ['screensaver-proxy', 'ScreensaverProxy'], + ['sharing', 'Sharing'], + ['sound', 'Sound'], + ['xsettings', 'XSettings'] ] if enable_smartcard - enabled_plugins += ['smartcard'] + enabled_plugins += [['smartcard', 'Smartcard']] endif if enable_wacom - enabled_plugins += ['wacom'] + enabled_plugins += [['wacom', 'Wacom']] endif if enable_cups - enabled_plugins += ['print-notifications'] + enabled_plugins += [['print-notifications', 'PrintNotifications']] endif if enable_rfkill - enabled_plugins += ['rfkill'] + enabled_plugins += [['rfkill', 'Rfkill']] endif plugins_conf = configuration_data() @@ -38,11 +38,25 @@ plugins_deps = [libgsd_dep] plugins_cflags = ['-DGNOME_SETTINGS_LOCALEDIR="@0@"'.format(gsd_localedir)] -foreach plugin_name: ['common'] + enabled_plugins +foreach plugin: [['common', '']] + enabled_plugins + plugin_name = plugin[0] + cflags = [ '-DG_LOG_DOMAIN="@0@-plugin"'.format(plugin_name), '-DPLUGIN_NAME="@0@"'.format(plugin_name), ] + plugins_cflags + if not ['common', 'dummy'].contains(plugin_name) + desktop = 'org.gnome.SettingsDaemon.@0@.desktop'.format(plugin[1]) + + configure_file( + input: join_paths(plugin_name, desktop + '.in'), + output: desktop, + configuration: plugins_conf, + install: true, + install_dir: gsd_xdg_autostart + ) + endif + subdir(plugin_name) endforeach |