meson: fix gstreamer-full static mode on win32

Win32 was expecting the symbol gst_init_static_plugins in gstreamer-full
dynamic mode.
Add mode in gstreamer gstreamer-full options to tell if its a
gstreamer-full static or shared mode.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5098>
This commit is contained in:
Stéphane Cerveau 2023-07-25 14:16:09 +01:00 committed by GStreamer Marge Bot
parent 461c4bc32c
commit 12b2dfe41b
4 changed files with 12 additions and 11 deletions

View file

@ -85,10 +85,14 @@ if not meson.is_subproject() and cc.get_id() == 'msvc'
endif
building_full = get_option('default_library') == 'static'
building_full_static = get_option('gst-full-target-type') == 'static_library'
building_full_static = false
building_full_options = []
if building_full
building_full_options = ['gstreamer-full=enabled']
building_full_options = ['gstreamer-static-full=false']
building_full_static = get_option('gst-full-target-type') == 'static_library'
if building_full_static
building_full_options = ['gstreamer-static-full=true']
endif
endif
libnice_options = []
@ -471,10 +475,7 @@ if building_full
link_depends : link_deps,
install : true,
)
gst_full_c_flags = []
if building_full_static or get_option('default_library') == 'static'
gst_full_c_flags += ['-DGST_STATIC_COMPILATION']
endif
gst_full_c_flags = ['-DGST_STATIC_COMPILATION']
gst_full_libs = [gstfull]

View file

@ -119,7 +119,7 @@
#endif
#endif
#ifdef GST_FULL_COMPILATION
#ifdef GST_FULL_STATIC_COMPILATION
void gst_init_static_plugins ();
#endif
@ -622,7 +622,7 @@ gst_register_core_elements (GstPlugin * plugin)
static void
init_static_plugins (void)
{
#ifdef GST_FULL_COMPILATION
#ifdef GST_FULL_STATIC_COMPILATION
gst_init_static_plugins ();
#else
GModule *module;

View file

@ -252,8 +252,8 @@ if not tracer_hooks
libgst_c_args += ['-DGST_DISABLE_GST_TRACER_HOOKS']
endif
if get_option('gstreamer-full').enabled()
libgst_c_args += ['-DGST_FULL_COMPILATION']
if get_option('gstreamer-static-full')
libgst_c_args += ['-DGST_FULL_STATIC_COMPILATION']
endif
# Make sure that subproject building gir files work

View file

@ -24,7 +24,7 @@ option('libdw', type : 'feature', value : 'auto', description : 'Use libdw to ge
option('dbghelp', type : 'feature', value : 'auto', description : 'Use dbghelp to generate backtraces')
option('bash-completion', type : 'feature', value : 'auto', description : 'Install bash completion files')
option('coretracers', type : 'feature', value : 'auto', description : 'Build coretracers plugin')
option('gstreamer-full', type : 'feature', value : 'disabled', description : 'Build with gstreamer-full')
option('gstreamer-static-full', type : 'boolean', value : 'false', description : 'Enable static support of gstreamer-full.')
# Common feature options
option('examples', type : 'feature', value : 'auto', yield : true)