[gnome-settings-daemon/benzea/systemd-3-36: 30/45] meson: Handle common directory separately



commit 33d96e671b61b3a9640acadc1ff47fd224184cbe
Author: Benjamin Berg <bberg redhat com>
Date:   Thu Dec 12 00:03:08 2019 +0100

    meson: Handle common directory separately
    
    It is not really worth it to use a loop just to set the log domain using
    the cflags. Explicitly name the common subdirectory rather than
    including it in the plugin loop.

 plugins/meson.build | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/plugins/meson.build b/plugins/meson.build
index e3a1ac55..9ddfe69d 100644
--- a/plugins/meson.build
+++ b/plugins/meson.build
@@ -51,11 +51,17 @@ plugins_cflags = ['-DGNOME_SETTINGS_LOCALEDIR="@0@"'.format(gsd_localedir)]
 
 enabled_plugins_file = []
 
-foreach plugin: [['common', '']] + enabled_plugins
+cflags = [
+  '-DG_LOG_DOMAIN="common"'
+] + plugins_cflags
+plugin_name = 'common'
+subdir('common')
+
+foreach plugin: enabled_plugins
   plugin_name = plugin[0]
   desktop = 'org.gnome.SettingsDaemon.@0@.desktop'.format(plugin[1])
 
-  if plugin[1] == '' # common or dummy
+  if plugin[1] == '' # dummy
     desktop_in_file = ''
   else
     desktop_in_file = files(join_paths(plugin_name, desktop + '.in'))
@@ -75,7 +81,7 @@ foreach plugin: enabled_plugins_file
     '-DPLUGIN_DBUS_NAME="@0@"'.format(plugin_dbus_name),
   ] + plugins_cflags
 
-  if not ['common', 'dummy'].contains(plugin_name)
+  if plugin_name != 'dummy'
     desktop = 'org.gnome.SettingsDaemon.@0@.desktop'.format(plugin[1])
     desktop_in_file = plugin[2]
     user_target = 'gsd-@0@.target'.format(plugin_name)


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