summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.com>2018-05-21 11:54:50 +0100
committerTim-Philipp Müller <tim@centricular.com>2018-05-21 11:55:53 +0100
commit906b37de60998831cd165e4f23707cc8cfb610c5 (patch)
tree20d33e0a347322740baf8727174784c29e83acdb
parentac90718ffc102f6411be271f0cdc222740ab28f6 (diff)
meson: add 'nls' option to disable translations
And enable by default. Was implicitly disabled because ENABLE_NLS was not defined. Also use .set_quoted().
-rw-r--r--meson.build14
-rw-r--r--meson_options.txt2
2 files changed, 11 insertions, 5 deletions
diff --git a/meson.build b/meson.build
index daad19c3..ad85f940 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 65dde098..939c17d5 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,