From: Tim-Philipp Müller Date: Mon, 21 May 2018 11:07:04 +0000 (+0100) Subject: meson: add 'nls' option to disable translations X-Git-Tag: 1.19.3~507^2~4172 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b0404761f0ad6aa33086c79a4d63a6fdf3998d51;p=platform%2Fupstream%2Fgstreamer.git meson: add 'nls' option to disable translations And enable by default. Was implicitly disabled because ENABLE_NLS was not defined. --- diff --git a/meson.build b/meson.build index c4e5067..9c8f894 100644 --- a/meson.build +++ b/meson.build @@ -272,6 +272,10 @@ cdata.set_quoted('GETTEXT_PACKAGE', 'gst-plugins-bad-1.0') cdata.set_quoted('GST_API_VERSION', api_version) cdata.set_quoted('GST_LICENSE', 'LGPL') cdata.set_quoted('LIBDIR', join_paths(get_option('prefix'), get_option('libdir'))) +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', @@ -517,7 +521,7 @@ subdir('pkgconfig') configure_file(output : 'config.h', configuration : cdata) # 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 eb1cff5..6380411 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -2,6 +2,8 @@ option('gst_player_tests', type: 'boolean', value: false, description: 'Enable GstPlayer tests that need network access') # 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', yield : true) option('introspection', type : 'boolean', value : true, yield : true, description : 'Generate gobject-introspection bindings')