mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-19 00:01:23 +00:00
2e3a575533
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1007 Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1805>
77 lines
2.2 KiB
Meson
77 lines
2.2 KiB
Meson
soup_sources = [
|
|
'gstsoup.c',
|
|
'gstsoupelement.c',
|
|
'gstsouphttpclientsink.c',
|
|
'gstsouphttpsrc.c',
|
|
'gstsouploader.c',
|
|
'gstsouputils.c',
|
|
]
|
|
|
|
soup_opt = get_option('soup')
|
|
if soup_opt.disabled()
|
|
subdir_done()
|
|
endif
|
|
|
|
gmodule_dep = dependency('gmodule-2.0', fallback: ['glib', 'libgmodule_dep'])
|
|
gobject_dep = dependency('gobject-2.0', fallback: ['glib', 'libgobject_dep'])
|
|
|
|
libdl_dep = cc.find_library('dl', required: false)
|
|
|
|
static_args = []
|
|
static_deps = []
|
|
default_library = get_option('default_library')
|
|
if default_library in ['static', 'both']
|
|
libsoup2_dep = dependency('libsoup-2.4', version : '>=2.48',
|
|
required : false, fallback : ['libsoup', 'libsoup_dep'],
|
|
default_options: ['sysprof=disabled'])
|
|
libsoup3_dep = dependency('libsoup-3.0', required : false,
|
|
fallback : ['libsoup3', 'libsoup_dep'])
|
|
if not libsoup2_dep.found() and not libsoup3_dep.found()
|
|
if soup_opt.enabled()
|
|
error('Either libsoup2 or libsoup3 is needed')
|
|
endif
|
|
subdir_done()
|
|
endif
|
|
if libsoup3_dep.found()
|
|
static_deps += libsoup3_dep
|
|
static_args += '-DSTATIC_SOUP=3'
|
|
elif libsoup2_dep.found()
|
|
static_deps += libsoup2_dep
|
|
static_args += '-DSTATIC_SOUP=2'
|
|
endif
|
|
endif
|
|
|
|
soup_library_kwargs = {
|
|
'sources' : soup_sources,
|
|
'link_args' : noseh_link_args,
|
|
'include_directories' : [configinc, libsinc],
|
|
'install' : true,
|
|
'install_dir' : plugins_install_dir,
|
|
}
|
|
soup_library_deps = [gst_dep, gstbase_dep, gsttag_dep, gmodule_dep, gobject_dep, gio_dep, libdl_dep]
|
|
soup_library_c_args = gst_plugins_good_args
|
|
|
|
if default_library in ['shared', 'both']
|
|
gstsouphttpsrc_shared = shared_library('gstsoup',
|
|
c_args : soup_library_c_args,
|
|
dependencies : soup_library_deps,
|
|
kwargs: soup_library_kwargs,
|
|
)
|
|
endif
|
|
|
|
if default_library in ['static', 'both']
|
|
gstsouphttpsrc_static = static_library('gstsoup',
|
|
c_args : soup_library_c_args + static_args,
|
|
dependencies : soup_library_deps + static_deps,
|
|
kwargs: soup_library_kwargs,
|
|
)
|
|
endif
|
|
|
|
if default_library == 'static'
|
|
gstsouphttpsrc = gstsouphttpsrc_static
|
|
else
|
|
gstsouphttpsrc = gstsouphttpsrc_shared
|
|
endif
|
|
|
|
pkgconfig.generate(gstsouphttpsrc, install_dir : plugins_pkgconfig_install_dir)
|
|
plugins += [gstsouphttpsrc]
|