gstreamer/subprojects/gst-plugins-good/ext/soup/meson.build
Philippe Normand c3455def2e soup: Runtime compatibility support for libsoup2 and libsoup3
The src and sink elements no longer link against libsoup. It is now loaded at
runtime. If any version is resident already, it is used. Otherwise we first try
to load libsoup3 and if it's not found we fallback to libsoup2.

For the unit-tests, we now build one version of the test unit file per libsoup
version found. So if both libsoup2 and libsoup3 are available on the host, the
CI will cover them both.

Based on initial patch by Daniel Kolesa <dkolesa@igalia.com> and
Patrick Griffis <pgriffis@igalia.com>.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1044>
2021-10-13 08:32:25 +00:00

30 lines
861 B
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)
gstsouphttpsrc = library('gstsoup',
soup_sources,
c_args : gst_plugins_good_args,
link_args : noseh_link_args,
include_directories : [configinc, libsinc],
dependencies : [gst_dep, gstbase_dep, gsttag_dep, gmodule_dep, gobject_dep, gio_dep, libdl_dep],
install : true,
install_dir : plugins_install_dir,
)
pkgconfig.generate(gstsouphttpsrc, install_dir : plugins_pkgconfig_install_dir)
plugins += [gstsouphttpsrc]