diff options
author | zhuyaliang <[email protected]> | 2023-10-16 16:17:40 +0800 |
---|---|---|
committer | raveit65 <[email protected]> | 2023-10-24 09:20:03 +0200 |
commit | 9a8cfd772538539776654401d7a1293595405c90 (patch) | |
tree | 88d775507986d0f0f3b6eb41f5fd4a86bfa3d85e /applets/inhibit | |
parent | 2561c8ad2c0f4168c6021172095fe40aa789deb7 (diff) | |
download | mate-power-manager-9a8cfd772538539776654401d7a1293595405c90.tar.bz2 mate-power-manager-9a8cfd772538539776654401d7a1293595405c90.tar.xz |
Add meson build support
Diffstat (limited to 'applets/inhibit')
-rw-r--r-- | applets/inhibit/meson.build | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/applets/inhibit/meson.build b/applets/inhibit/meson.build new file mode 100644 index 0000000..f161d3c --- /dev/null +++ b/applets/inhibit/meson.build @@ -0,0 +1,68 @@ +po_dir = join_paths(meson.source_root(), 'po') + +source_files = files( + 'gpm-common.c', + 'inhibit-applet.c' +) + +cflags = [ + '-DMATELOCALEDIR="@0@"'.format(matelocaledir), + '-DG_LOG_DOMAIN="~/mate-power-manager.log"', + '-DGPM_ICONS_DATA="@0@"'.format(mateicons), + '-DINHIBIT_MENU_UI_DIR="@0@"'.format(mateui), + '-DEGG_VERBOSE="GPM_VERBOSE"', + '-DEGG_LOGGING="GPM_LOGGING"', + '-DEGG_CONSOLE="GPM_CONSOLE"' + ] + +executable('mate-inhibit-applet', + sources: source_files, + dependencies : [ + gtk, + glib, + cairo, + notify, + dbus, + dbusglib, + matepanel + ], + include_directories : config_inc, + c_args : cflags, + install : true, + install_dir: mateexecdir, +) + +# .service files + +service_data = configuration_data() +service_data.set('LIBEXECDIR', join_paths(prefix, get_option('libexecdir'))) + +configure_file( + input : 'org.mate.panel.applet.InhibitAppletFactory.service.in', + output : 'org.mate.panel.applet.InhibitAppletFactory.service', + configuration : service_data, + install : true, + install_dir : join_paths(matedatadir, 'dbus-1/services') +) + +desktop_data = configuration_data() +desktop_data.set('VERSION', meson.project_version()) +desktop_data.set('LIBEXECDIR', join_paths(prefix, get_option('libexecdir'))) +desktop_in_file = configure_file( + input : 'org.mate.InhibitApplet.mate-panel-applet.desktop.in.in', + output : 'org.mate.InhibitApplet.mate-panel-applet.desktop.in', + configuration : desktop_data +) + +i18n.merge_file( + input : desktop_in_file, + output : 'org.mate.InhibitApplet.mate-panel-applet', + type : 'desktop', + po_dir : po_dir, + install : true, + install_dir : join_paths(matedatadir, 'mate-panel', 'applets') +) + +install_data('inhibit-applet-menu.xml', + install_dir : join_paths(pkgdatadir, 'ui') +) |