summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.com>2017-05-20 15:07:31 +0100
committerTim-Philipp Müller <tim@centricular.com>2017-05-20 15:07:31 +0100
commit0ce18a878d43e7b15141e7ebcf365f43c9095329 (patch)
tree19a8e9419738c533740d09ed8e779ddb254e36d0
parentb344248630bebbcf5551bd2599cf39e665aa2d96 (diff)
meson: add options to set package name and origin
https://bugzilla.gnome.org/show_bug.cgi?id=782172
-rw-r--r--meson.build15
-rw-r--r--meson_options.txt4
2 files changed, 17 insertions, 2 deletions
diff --git a/meson.build b/meson.build
index 4789e5f..be6c837 100644
--- a/meson.build
+++ b/meson.build
@@ -30,11 +30,22 @@ cdata.set('GETTEXT_PACKAGE', '"gst-rtsp-server-1.0"')
cdata.set('PACKAGE', '"gst-rtsp-server"')
cdata.set('VERSION', '"@0@"'.format(gst_version))
cdata.set('PACKAGE_VERSION', '"@0@"'.format(gst_version))
-cdata.set('GST_PACKAGE_NAME', '"GStreamer RTSP Server Library"')
-cdata.set('GST_PACKAGE_ORIGIN', '"Unknown package origin"')
#cdata.set('GST_API_VERSION', '"@0@"'.format(api_version))
cdata.set('GST_LICENSE', '"LGPL"')
+# GStreamer package name and origin url
+gst_package_name = get_option('with-package-name')
+if gst_package_name == ''
+ if gst_version_nano == 0
+ cdata.set_quoted('GST_PACKAGE_NAME', 'GStreamer RTSP Server Library source release')
+ elif gst_version_nano == 1
+ cdata.set_quoted('GST_PACKAGE_NAME', 'GStreamer RTSP Server Library git')
+ else
+ cdata.set_quoted('GST_PACKAGE_NAME', 'GStreamer RTSP Server Library prerelease')
+ endif
+endif
+cdata.set_quoted('GST_PACKAGE_ORIGIN', get_option('with-package-origin'))
+
configure_file(input : 'config.h.meson',
output : 'config.h',
configuration : cdata)
diff --git a/meson_options.txt b/meson_options.txt
index e265545..16265d3 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -1,3 +1,7 @@
option('disable_introspection',
type : 'boolean', value : false,
description : 'Whether to disable the introspection generation')
+option('with-package-name', type : 'string',
+ description : 'package name to use in plugins')
+option('with-package-origin', type : 'string', value : 'Unknown package origin',
+ description : 'package origin URL to use in plugins')