meson: Unset the plugin paths to generate the .gir files
authorThibault Saunier <thibault.saunier@osg.samsung.com>
Fri, 4 Nov 2016 13:19:17 +0000 (10:19 -0300)
committerThibault Saunier <thibault.saunier@osg.samsung.com>
Fri, 4 Nov 2016 17:37:43 +0000 (14:37 -0300)
Avoiding problems when using subproject:

    Failed to load plugin 'something.so: file too short

meson.build

index 055d905..d0de27d 100644 (file)
@@ -315,7 +315,11 @@ gnome = import('gnome')
 # Fixme, not very elegant.
 build_gir = gir.found() and not meson.is_cross_build() and not get_option('disable_introspection')
 
-gir_init_section = [ '--add-init-section=extern void gst_init(gint*,gchar**); gst_init(NULL,NULL);' ]
+gir_init_section = [ '--add-init-section=extern void gst_init(gint*,gchar**);' + \
+    'g_setenv("GST_REGISTRY_1.0", "/no/way/this/exists.reg", TRUE);' + \
+    'g_setenv("GST_PLUGIN_PATH_1_0", "", TRUE);' + \
+    'g_setenv("GST_PLUGIN_SYSTEM_PATH_1_0", "", TRUE);' + \
+    'gst_init(NULL,NULL);' ]
 vs_module_defs_dir = meson.current_source_dir() + '/win32/common/'
 
 gst_c_args = ['-DHAVE_CONFIG_H']