diff options
author | Florian Pelz <pelzflorian@pelzflorian.de> | 2017-10-24 13:34:42 +0200 |
---|---|---|
committer | Florian Pelz <pelzflorian@pelzflorian.de> | 2017-10-24 13:34:42 +0200 |
commit | 5c16a5cb00388fb72d3fa1b1704d3bc52abd09aa (patch) | |
tree | f8b246ae7a51d47043e2a7946ca595df5e62e8ba | |
parent | fdcfe076b609d83eaa816af479a853215ee806c2 (diff) |
Add meson build files.
-rw-r--r-- | README | 9 | ||||
-rw-r--r-- | meson.build | 51 | ||||
-rw-r--r-- | po/meson.build | 2 |
3 files changed, 59 insertions, 3 deletions
@@ -29,8 +29,11 @@ This file may be provided by your system distribution in a package called 'words' oder 'wordlist'. To install Don’t Hang, run -./autogen.sh -./configure --prefix=$HOME/.local -make install +cd /path/to/dont-hang/ +mkdir builddir +cd builddir +meson build .. --prefix=$HOME/.local +cd build +ninja install Have fun! 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 diff --git a/po/meson.build b/po/meson.build new file mode 100644 index 0000000..9daac1d --- /dev/null +++ b/po/meson.build @@ -0,0 +1,2 @@ +i18n = import('i18n') +i18n.gettext('dont-hang', preset : 'glib') |