summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build51
1 files changed, 51 insertions, 0 deletions
diff --git a/meson.build b/meson.build
new file mode 100644
index 0000000..019a864
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,51 @@
+project('dont-hang', 'c',
+ license : 'CC0',
+ version : '1.2')
+
+incdir = include_directories('.')
+
+gtkdep = dependency('gtk+-3.0', version : '>= 3.18')
+
+cdata = configuration_data()
+cdata.set_quoted('DATADIR', join_paths(get_option('prefix'), get_option('datadir')))
+cdata.set('ENABLE_BIDI_SUPPORT', 1)
+cdata.set('ENABLE_NLS', 1) # enable internationalization (i18n)
+cdata.set('GETTEXT_PACKAGE', '"dont-hang"')
+
+configure_file(output : 'config.h',
+ configuration : cdata)
+
+subdir('po')
+
+executable('dont-hang', 'hangman.c',
+ dependencies : gtkdep,
+ include_directories : incdir,
+ install : true,
+ gui_app : true)
+
+if host_machine.system() != 'windows'
+ datadir = get_option('datadir')
+ appdatadir = join_paths(datadir, 'metainfo')
+ desktopdir = join_paths(datadir, 'applications')
+
+ icon_resolutions = ['16x16', '22x22', '24x24', '32x32', '48x48', '256x256']
+ foreach res : icon_resolutions
+ path = join_paths('icons', 'hicolor', res, 'apps')
+ install_data(join_paths(path, 'donthang.png'), install_dir : join_paths(datadir, path))
+ endforeach
+
+ i18n.merge_file('appdata',
+ input : 'de.pelzflorian.DontHang.appdata.xml.in',
+ output : 'de.pelzflorian.DontHang.appdata.xml',
+ install : true,
+ install_dir : appdatadir,
+ po_dir : 'po')
+
+ i18n.merge_file('desktop',
+ input : 'de.pelzflorian.DontHang.desktop.in',
+ output : 'de.pelzflorian.DontHang.desktop',
+ install : true,
+ install_dir : desktopdir,
+ po_dir : 'po',
+ type : 'desktop')
+endif