4 'gstsouphttpclientsink.c',
10 soup_opt = get_option('soup')
11 if soup_opt.disabled()
15 libdl_dep = cc.find_library('dl', required: false)
19 default_library = get_option('default_library')
20 if default_library in ['static', 'both']
21 libsoup2_dep = dependency('libsoup-2.4', version : '>=2.48',
22 required : false, fallback : ['libsoup', 'libsoup_dep'],
23 default_options: ['sysprof=disabled'])
24 libsoup3_dep = dependency('libsoup-3.0', required : false,
25 fallback : ['libsoup3', 'libsoup_dep'])
26 if not libsoup2_dep.found() and not libsoup3_dep.found()
28 error('Either libsoup2 or libsoup3 is needed')
32 if libsoup3_dep.found()
33 static_deps += libsoup3_dep
34 static_args += '-DSTATIC_SOUP=3'
35 message('soup plugin: using libsoup-3.0 for static build')
36 elif libsoup2_dep.found()
37 static_deps += libsoup2_dep
38 static_args += '-DSTATIC_SOUP=2'
39 message('soup plugin: using libsoup-2.4 for static build')
43 soup_library_kwargs = {
44 'sources' : soup_sources,
45 'link_args' : noseh_link_args,
46 'include_directories' : [configinc, libsinc],
48 'install_dir' : plugins_install_dir,
50 soup_library_deps = [gst_dep, gstbase_dep, gsttag_dep, gmodule_dep, gio_dep, libdl_dep]
51 soup_library_c_args = gst_plugins_good_args
53 if default_library in ['shared', 'both']
54 gstsouphttpsrc_shared = shared_library('gstsoup',
55 c_args : soup_library_c_args,
56 dependencies : soup_library_deps,
57 kwargs: soup_library_kwargs,
61 if default_library in ['static', 'both']
62 gstsouphttpsrc_static = static_library('gstsoup',
63 c_args : soup_library_c_args + static_args,
64 dependencies : soup_library_deps + static_deps,
65 kwargs: soup_library_kwargs,
69 # Use the static library to generate the .pc file if it's available. The shared
70 # library .pc file does not have a Requires: on libsoup-2.4, and we use plugin
71 # .pc files to generate dependencies for linking plugins statically.
72 if default_library == 'shared'
73 pkgconfig.generate(gstsouphttpsrc_shared, install_dir : plugins_pkgconfig_install_dir)
75 pkgconfig.generate(gstsouphttpsrc_static, install_dir : plugins_pkgconfig_install_dir)
78 # Add the shared library to the plugins list if available. We pass this list of
79 # plugins to hotdoc to generate the plugins cache, which introspects the plugin
80 # by loading it. We need the shared plugin for that.
81 if default_library == 'static'
82 plugins += [gstsouphttpsrc_static]
84 plugins += [gstsouphttpsrc_shared]