2016-08-12 15:42:30 +00:00
|
|
|
soup_sources = [
|
2021-10-04 08:31:02 +00:00
|
|
|
'gstsoup.c',
|
|
|
|
'gstsoupelement.c',
|
2016-08-12 15:42:30 +00:00
|
|
|
'gstsouphttpclientsink.c',
|
2021-10-04 08:31:02 +00:00
|
|
|
'gstsouphttpsrc.c',
|
|
|
|
'gstsouploader.c',
|
2016-08-12 15:42:30 +00:00
|
|
|
'gstsouputils.c',
|
|
|
|
]
|
|
|
|
|
2021-10-04 08:31:02 +00:00
|
|
|
soup_opt = get_option('soup')
|
2024-02-20 21:00:11 +00:00
|
|
|
soup_ver_opt = get_option('soup-version')
|
2021-10-04 08:31:02 +00:00
|
|
|
if soup_opt.disabled()
|
|
|
|
subdir_done()
|
|
|
|
endif
|
2016-08-12 15:42:30 +00:00
|
|
|
|
2024-10-09 20:37:38 +00:00
|
|
|
if soup_lookup_dep and not libsoup3_dep.found() and not libsoup2_dep.found()
|
|
|
|
if soup_opt.enabled()
|
|
|
|
error(f'soup: Either libsoup2 or libsoup3 is needed')
|
2024-02-20 21:00:11 +00:00
|
|
|
endif
|
2024-10-09 20:37:38 +00:00
|
|
|
message(f'Not building soup plugin: must link to either libsoup2 or libsoup3')
|
|
|
|
subdir_done()
|
2024-02-23 06:15:50 +00:00
|
|
|
endif
|
2024-02-20 21:00:11 +00:00
|
|
|
|
2024-10-09 20:37:38 +00:00
|
|
|
libdl_dep = cc.find_library('dl', required: false)
|
2022-01-16 14:41:41 +00:00
|
|
|
|
2022-03-02 17:52:39 +00:00
|
|
|
soup_library_kwargs = {
|
|
|
|
'sources' : soup_sources,
|
|
|
|
'link_args' : noseh_link_args,
|
|
|
|
'include_directories' : [configinc, libsinc],
|
|
|
|
'install' : true,
|
|
|
|
'install_dir' : plugins_install_dir,
|
|
|
|
}
|
2022-03-25 19:00:20 +00:00
|
|
|
soup_library_deps = [gst_dep, gstbase_dep, gsttag_dep, gmodule_dep, gio_dep, libdl_dep]
|
2022-03-02 17:52:39 +00:00
|
|
|
soup_library_c_args = gst_plugins_good_args
|
|
|
|
|
2024-10-09 20:37:38 +00:00
|
|
|
if host_system == 'windows'
|
|
|
|
assert(soup_linked_target)
|
2024-02-20 21:00:11 +00:00
|
|
|
gstsouphttpsrc = library('gstsoup',
|
2024-10-09 20:37:38 +00:00
|
|
|
c_args : soup_library_c_args + soup_linked_target_args,
|
|
|
|
dependencies : soup_library_deps + soup_linked_target_deps,
|
2022-03-02 17:52:39 +00:00
|
|
|
kwargs: soup_library_kwargs,
|
|
|
|
)
|
2024-02-20 21:00:11 +00:00
|
|
|
gstsouphttpsrc_shared = gstsouphttpsrc
|
|
|
|
gstsouphttpsrc_static = gstsouphttpsrc
|
|
|
|
else
|
|
|
|
if default_library in ['static', 'both']
|
2024-10-09 20:37:38 +00:00
|
|
|
assert(soup_linked_target)
|
2024-02-20 21:00:11 +00:00
|
|
|
gstsouphttpsrc_static = static_library('gstsoup',
|
2024-10-09 20:37:38 +00:00
|
|
|
c_args : soup_library_c_args + soup_linked_target_args,
|
|
|
|
dependencies : soup_library_deps + soup_linked_target_deps,
|
2024-02-20 21:00:11 +00:00
|
|
|
kwargs: soup_library_kwargs,
|
|
|
|
)
|
|
|
|
endif
|
|
|
|
if default_library in ['shared', 'both']
|
|
|
|
gstsouphttpsrc_shared = shared_library('gstsoup',
|
|
|
|
c_args : soup_library_c_args,
|
|
|
|
dependencies : soup_library_deps,
|
2024-10-09 20:37:38 +00:00
|
|
|
kwargs: soup_library_kwargs + soup_dlopen_target_kwargs,
|
2024-02-20 21:00:11 +00:00
|
|
|
)
|
|
|
|
endif
|
2022-03-02 17:52:39 +00:00
|
|
|
endif
|
|
|
|
|
2024-02-20 21:00:11 +00:00
|
|
|
# Use the static library to generate the .pc file on Linux if it's available.
|
|
|
|
# In that case, the shared library .pc file does not have a Requires: on
|
|
|
|
# libsoup-2.4, and we use plugin .pc files to generate dependencies for linking
|
|
|
|
# plugins statically.
|
2022-03-02 19:07:57 +00:00
|
|
|
if default_library == 'shared'
|
|
|
|
pkgconfig.generate(gstsouphttpsrc_shared, install_dir : plugins_pkgconfig_install_dir)
|
2022-03-02 17:52:39 +00:00
|
|
|
else
|
2022-03-02 19:07:57 +00:00
|
|
|
pkgconfig.generate(gstsouphttpsrc_static, install_dir : plugins_pkgconfig_install_dir)
|
2022-03-02 17:52:39 +00:00
|
|
|
endif
|
|
|
|
|
2022-03-02 19:07:57 +00:00
|
|
|
# Add the shared library to the plugins list if available. We pass this list of
|
|
|
|
# plugins to hotdoc to generate the plugins cache, which introspects the plugin
|
|
|
|
# by loading it. We need the shared plugin for that.
|
|
|
|
if default_library == 'static'
|
|
|
|
plugins += [gstsouphttpsrc_static]
|
|
|
|
else
|
|
|
|
plugins += [gstsouphttpsrc_shared]
|
|
|
|
endif
|