diff options
author | Christos Margiolis <christos@margiolis.net> | 2023-11-02 20:35:24 +0200 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2023-11-13 00:58:11 +0000 |
commit | 1e3b3592313ab415f1a821a401b278fe09dfd6f5 (patch) | |
tree | db39a89b74f8119c62bb30fcbf35c2520194b5b0 | |
parent | a3e0b40690e7912e4a7f161c88fa3ff6fc3e8cb9 (diff) |
meson: make native language support optional
Since commit fb7139bd ("Drop autotools"), optional NLS was automatically
removed as a side-effect, which means .po files are installed by
default, although many users do not want that. Bring back the option for
NLS and have it enabled by default in order to be backwards compatible.
-rw-r--r-- | meson_options.txt | 4 | ||||
-rw-r--r-- | po/meson.build | 12 |
2 files changed, 11 insertions, 5 deletions
diff --git a/meson_options.txt b/meson_options.txt index 39d433bb..1feb033a 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -10,3 +10,7 @@ option('xorg-rules-symlinks', type: 'boolean', value: false, description: 'create "xorg" symlinks to the "base" rules files [default=false]') +option('nls', + type: 'boolean', + value: true, + description: 'build with native language support (NLS) [default=true]') diff --git a/po/meson.build b/po/meson.build index 3e512def..addf0d3a 100644 --- a/po/meson.build +++ b/po/meson.build @@ -1,5 +1,7 @@ -i18n = import('i18n') -i18n.gettext('xkeyboard-config', preset: 'glib', - args: ['--keyword=_', - '--keyword=N_', - '--its=@0@/rules/xkb.its'.format(meson.source_root())]) +if get_option('nls') + i18n = import('i18n') + i18n.gettext('xkeyboard-config', preset: 'glib', + args: ['--keyword=_', + '--keyword=N_', + '--its=@0@/rules/xkb.its'.format(meson.source_root())]) +endif |