meson: add 'nls' option to disable translations

And enable by default. Was implicitly disabled because
ENABLE_NLS was not defined.
This commit is contained in:
Tim-Philipp Müller 2018-05-20 14:07:15 +01:00
parent 09dee79774
commit 661490d60d
2 changed files with 4 additions and 1 deletions

View file

@ -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

View file

@ -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,