meson: Use join_paths and .set_quoted where possible
authorNicolas Dufresne <nicolas.dufresne@collabora.com>
Tue, 11 Jul 2017 18:55:42 +0000 (14:55 -0400)
committerNicolas Dufresne <nicolas.dufresne@collabora.com>
Tue, 11 Jul 2017 18:57:26 +0000 (14:57 -0400)
data/bash-completion/helpers/meson.build
meson.build
plugins/elements/meson.build

index 0a7ed7be670032bcfcc1747712c0fb203fa2dcdb..c5399bf28794503b9fab6e22b1d0bf1fd555c400 100644 (file)
@@ -1,6 +1,6 @@
 bash_helper_conf = configuration_data()
 bash_helper_conf.set('GST_COMPLETION_HELPER_INSTALLED',
-    '@0@/@1@/gst-completion-helper'.format(prefix, helpers_install_dir))
+    join_paths(prefix, helpers_install_dir, 'gst-completion-helper'))
 bash_helper_conf.set('GST_API_VERSION', apiversion)
 
 configure_file(input : 'gst.in',
index 8f4dc2c729da271136b9be1e6b6f7a544bba0db8..844950c0a94ed4846a2ef6c8e6b18a29698db775 100644 (file)
@@ -49,26 +49,26 @@ elif cc.has_argument('-Wl,-Bsymbolic-functions')
 endif
 
 cdata = configuration_data()
-cdata.set('GST_API_VERSION', '"@0@"'.format(apiversion))
-cdata.set('GST_DATADIR', '"@0@/@1@"'.format(prefix, get_option('datadir')))
-cdata.set('LOCALEDIR', '"@0@/@1@"'.format(prefix, get_option('localedir')))
-cdata.set('LIBDIR', '"@0@/@1@"'.format(prefix, get_option('libdir')))
-cdata.set('GST_API_VERSION', '"1.0"')
-cdata.set('GETTEXT_PACKAGE', '"gstreamer-1.0"')
-cdata.set('GST_LICENSE', '"LGPL"')
-cdata.set('PACKAGE', '"gstreamer"')
-cdata.set('PACKAGE_NAME', '"GStreamer"')
-cdata.set('PACKAGE_STRING', '"GStreamer @0@"'.format(gst_version))
-cdata.set('PACKAGE_TARNAME', '"gstreamer"')
-cdata.set('PACKAGE_BUGREPORT', '"http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer"')
-cdata.set('PACKAGE_URL', '""')
-cdata.set('PACKAGE_VERSION', '"@0@"'.format(gst_version))
-cdata.set('PLUGINDIR', '"@0@/@1@/gstreamer-1.0"'.format(get_option('prefix'),get_option('libdir')))
-cdata.set('VERSION', '"@0@"'.format(gst_version))
+cdata.set_quoted('GST_API_VERSION', apiversion)
+cdata.set_quoted('GST_DATADIR', join_paths(prefix, get_option('datadir')))
+cdata.set_quoted('LOCALEDIR', join_paths(prefix, get_option('localedir')))
+cdata.set_quoted('LIBDIR', join_paths(prefix, get_option('libdir')))
+cdata.set_quoted('GST_API_VERSION', '1.0')
+cdata.set_quoted('GETTEXT_PACKAGE', 'gstreamer-1.0')
+cdata.set_quoted('GST_LICENSE', 'LGPL')
+cdata.set_quoted('PACKAGE', 'gstreamer')
+cdata.set_quoted('PACKAGE_NAME', 'GStreamer')
+cdata.set_quoted('PACKAGE_STRING', 'GStreamer @0@'.format(gst_version))
+cdata.set_quoted('PACKAGE_TARNAME', 'gstreamer')
+cdata.set_quoted('PACKAGE_BUGREPORT', 'http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer')
+cdata.set_quoted('PACKAGE_URL', '')
+cdata.set_quoted('PACKAGE_VERSION', gst_version)
+cdata.set_quoted('PLUGINDIR', join_paths(get_option('prefix'), get_option('libdir'), 'gstreamer-1.0'))
+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('GST_PLUGIN_SCANNER_INSTALLED', '"@0@/@1@/gst-plugin-scanner"'.format(prefix, helpers_install_dir))
-cdata.set('GST_PTP_HELPER_INSTALLED', '"@0@/@1@/gst-ptp-helper"'.format(prefix, helpers_install_dir))
+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'))
 
 if gst_version_nano > 0
     # Have GST_ERROR message printed when running from git
@@ -113,7 +113,7 @@ foreach h : host_defines
   endif
 endforeach
 # FIXME: should really be called HOST_CPU or such
-cdata.set('TARGET_CPU', '"@0@"'.format(host_machine.cpu()))
+cdata.set_quoted('TARGET_CPU', host_machine.cpu())
 
 check_headers = [
   'dlfcn.h',
index abb2e26695c16af22c220a1b769e1a71683f9eb2..3518fcc5fedd13b35f2539c62deb9355891adfce 100644 (file)
@@ -32,7 +32,7 @@ if libtype != 'shared'
     include_directories : [configinc],
     dependencies : [gobject_dep, glib_dep, gst_dep, gst_base_dep],
     install : true,
-    install_dir : '@0@/gstreamer-1.0'.format(get_option('libdir')),
+    install_dir : join_paths(get_option('libdir'), 'gstreamer-1.0'),
   )
   gst_elements = gst_elements_static
 endif
@@ -44,7 +44,7 @@ if libtype != 'static'
     include_directories : [configinc],
     dependencies : [gobject_dep, glib_dep, gst_dep, gst_base_dep],
     install : true,
-    install_dir : '@0@/gstreamer-1.0'.format(get_option('libdir')),
+    install_dir : join_paths(get_option('libdir'), 'gstreamer-1.0'),
   )
   gst_elements = gst_elements_shared
 endif