From ddee82c89f3d057c9a4001f6579b7238bac4da0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Mon, 21 May 2018 11:46:59 +0100 Subject: [PATCH] meson: add 'nls' option to disable translations And enable by default. Was implicitly disabled because ENABLE_NLS was not defined. --- meson.build | 6 +++++- meson_options.txt | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 50c399eab0..544941d7ce 100644 --- a/meson.build +++ b/meson.build @@ -148,6 +148,10 @@ cdata.set('PACKAGE_VERSION', '"@0@"'.format(gst_version)) cdata.set('GST_LICENSE', '"LGPL"') cdata.set('PACKAGE', '"gst-plugins-good"') cdata.set('GETTEXT_PACKAGE', '"gst-plugins-good-1.0"') +cdata.set_quoted('LOCALEDIR', join_paths(get_option('prefix'), get_option('localedir'))) +if get_option('nls') + cdata.set('ENABLE_NLS', 1) +endif warning_flags = [ '-Wmissing-declarations', @@ -371,7 +375,7 @@ subdir('tests') subdir('pkgconfig') # xgettext is optional (on Windows for instance) -if find_program('xgettext', required : false).found() +if get_option('nls') and find_program('xgettext', required : false).found() subdir('po') endif diff --git a/meson_options.txt b/meson_options.txt index af0f53ed2d..a7266e8862 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -5,6 +5,8 @@ option('libv4l2', type : 'boolean', value : true, description : 'Use libv4l2 for some obscure format conversions') # Common options +option('nls', type : 'boolean', value : true, yield: true, + description : 'Enable native language support (translations)') option('orc', type : 'combo', choices : ['yes', 'no', 'auto'], value : 'auto') option('package-name', type : 'string', yield : true, description : 'package name to use in plugins')