summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorzhuyaliang <[email protected]>2023-05-23 17:24:08 +0800
committerLuke from DC <[email protected]>2023-05-25 16:13:58 +0000
commita3f91214bc683e61426d25d8cf6e27b7e51412aa (patch)
tree5ed74f9c4bc95ce59861bdb9f44429b305833829 /src
parent65a6c367e28e338dc74931dece1af9e53338276f (diff)
downloadmate-polkit-a3f91214bc683e61426d25d8cf6e27b7e51412aa.tar.bz2
mate-polkit-a3f91214bc683e61426d25d8cf6e27b7e51412aa.tar.xz
Add meson compilation support
Diffstat (limited to 'src')
-rw-r--r--src/meson.build50
1 files changed, 50 insertions, 0 deletions
diff --git a/src/meson.build b/src/meson.build
new file mode 100644
index 0000000..0a56598
--- /dev/null
+++ b/src/meson.build
@@ -0,0 +1,50 @@
+po_dir = join_paths(meson.source_root(), 'po')
+# Sources
+
+source_files = files(
+ 'main.c',
+ 'polkitmateauthenticationdialog.c',
+ 'polkitmateauthenticator.c',
+ 'polkitmatelistener.c'
+
+)
+
+# Build targets
+
+executable('polkit-mate-authentication-agent-1',
+ sources : [
+ config_file,
+ source_files
+ ],
+ dependencies : [
+ glib_dep,
+ gthread_dep,
+ gtk_dep,
+ agent_dep,
+ gobject_dep,
+ appindicator_dep
+ ],
+ include_directories : config_inc,
+ c_args : c_args + ['-DPOLKIT_AGENT_I_KNOW_API_IS_SUBJECT_TO_CHANGE'] + ['-DHAVE_CONFIG_H'],
+ install : true,
+ install_dir: get_option('libexecdir')
+)
+
+# .desktop file
+
+desktop_data = configuration_data()
+desktop_data.set('FULL_LIBEXECDIR', get_option('libexecdir'))
+desktop_in_file = configure_file(
+ input : 'polkit-mate-authentication-agent-1.desktop.in.in',
+ output : 'polkit-mate-authentication-agent-1.desktop.in',
+ configuration : desktop_data
+)
+
+i18n.merge_file(
+ input : desktop_in_file,
+ output : 'polkit-mate-authentication-agent-1.desktop',
+ type : 'desktop',
+ po_dir : po_dir,
+ install : true,
+ install_dir: join_paths(get_option('sysconfdir'), 'xdg', 'autostart')
+)