From 661490d60d888878106c62415faa8ae3e8d036d0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim-Philipp=20M=C3=BCller?= Date: Sun, 20 May 2018 14:07:15 +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 | 3 ++- meson_options.txt | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 0a6cff8..324495d 100644 --- a/meson.build +++ b/meson.build @@ -77,6 +77,7 @@ cdata.set_quoted('PLUGINDIR', join_paths(get_option('prefix'), get_option('libdi cdata.set_quoted('VERSION', gst_version) # FIXME: --with-memory-alignment],[8,N,malloc,pagesize (default is 32)]) option cdata.set('MEMORY_ALIGNMENT_MALLOC', 1) +cdata.set('ENABLE_NLS', get_option('nls')) cdata.set_quoted('GST_PLUGIN_SCANNER_INSTALLED', join_paths(prefix, helpers_install_dir, 'gst-plugin-scanner')) cdata.set_quoted('GST_PTP_HELPER_INSTALLED', join_paths(prefix, helpers_install_dir, 'gst-ptp-helper')) cdata.set_quoted('GST_PLUGIN_SCANNER_SUBDIR', libexecdir, @@ -473,7 +474,7 @@ subdir('tests') subdir('data') # 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 4dfb5a8..80da408 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -18,6 +18,8 @@ option('gtkdoc', type : 'boolean', value : true, yield : true, description : 'Generate API documentation with gtk-doc') option('introspection', type : 'boolean', value : true, yield : true, description : 'Generate gobject-introspection bindings') +option('nls', type : 'boolean', value : true, yield: true, + description : 'Enable native language support (translations)') option('package-name', type : 'string', yield : true, description : 'package name to use in plugins') option('package-origin', type : 'string', value : 'Unknown package origin', yield : true, -- 2.7.4