diff options
author | Xavier Claessens <xavier.claessens@collabora.com> | 2018-10-27 07:29:40 -0400 |
---|---|---|
committer | Xavier Claessens <xavier.claessens@collabora.com> | 2022-04-24 21:53:39 -0400 |
commit | 31998d84cb241a4c6343c97afc06ee24e60db032 (patch) | |
tree | 96ceab20f46369255d0388a62ed594e0beb7ff2a | |
parent | 23ae2f59bea7405d95218e82edb7f3c4c7c80a87 (diff) | |
download | json-glib-31998d84cb241a4c6343c97afc06ee24e60db032.tar.gz |
Make xgettext optional
This copies the same logic and option from glib.
-rw-r--r-- | meson.build | 7 | ||||
-rw-r--r-- | meson_options.txt | 3 |
2 files changed, 9 insertions, 1 deletions
diff --git a/meson.build b/meson.build index aeea9cf..f6b72d4 100644 --- a/meson.build +++ b/meson.build @@ -152,7 +152,12 @@ python3 = import('python').find_installation() gen_installed_test = files('build-aux/gen-installed-test.py') subdir('json-glib') -subdir('po') + +# xgettext is optional (on Windows for instance) +if find_program('xgettext', required : get_option('nls')).found() + subdir('po') +endif + subdir('doc') if not meson.is_subproject() diff --git a/meson_options.txt b/meson_options.txt index 068a03f..5a96998 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -10,3 +10,6 @@ option('man', option('tests', type: 'boolean', value: true, description: 'Build the tests') +option('nls', + type: 'feature', value: 'auto', yield: true, + description: 'Enable native language support (translations)') |