diff --git a/meson.build b/meson.build index daad19c351..ad85f940ac 100644 --- a/meson.build +++ b/meson.build @@ -114,10 +114,14 @@ cdata.set('SIZEOF_LONG', cc.sizeof('long')) cdata.set('SIZEOF_SHORT', cc.sizeof('short')) cdata.set('SIZEOF_VOIDP', cc.sizeof('void*')) -cdata.set('VERSION', '"@0@"'.format(gst_version)) -cdata.set('PACKAGE', '"gst-plugins-ugly"') -cdata.set('GETTEXT_PACKAGE', '"gst-plugins-ugly-1.0"') -cdata.set('GST_LICENSE', '"LGPL"') +cdata.set_quoted('VERSION', gst_version) +cdata.set_quoted('PACKAGE', 'gst-plugins-ugly') +cdata.set_quoted('GST_LICENSE', 'LGPL') +cdata.set_quoted('GETTEXT_PACKAGE', 'gst-plugins-ugly-1.0') +cdata.set_quoted('LOCALEDIR', join_paths(get_option('prefix'), get_option('localedir'))) +if get_option('nls') + cdata.set('ENABLE_NLS', 1) +endif # GStreamer package name and origin url gst_package_name = get_option('package-name') @@ -248,7 +252,7 @@ subdir('ext') subdir('tests') # 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 65dde098af..939c17d5a2 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -2,6 +2,8 @@ option('x264_libraries', type : 'string', value : '', description : 'Colon separated list of additional x264 library paths, e.g. for 10-bit version') # Common options +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,