[json-glib: 1/2] Make xgettext optional
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [json-glib: 1/2] Make xgettext optional
- Date: Tue, 11 Oct 2022 13:35:28 +0000 (UTC)
commit 31998d84cb241a4c6343c97afc06ee24e60db032
Author: Xavier Claessens <xavier claessens collabora com>
Date: Sat Oct 27 07:29:40 2018 -0400
Make xgettext optional
This copies the same logic and option from glib.
meson.build | 7 ++++++-
meson_options.txt | 3 +++
2 files changed, 9 insertions(+), 1 deletion(-)
---
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)')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]