4 'gstsouphttpclientsink.c',
10 soup_opt = get_option('soup')
11 if soup_opt.disabled()
15 gmodule_dep = dependency('gmodule-2.0', fallback: ['glib', 'libgmodule_dep'])
16 gobject_dep = dependency('gobject-2.0', fallback: ['glib', 'libgobject_dep'])
18 libdl_dep = cc.find_library('dl', required: false)
22 default_library = get_option('default_library')
23 if default_library in ['static', 'both']
24 libsoup2_dep = dependency('libsoup-2.4', version : '>=2.48',
25 required : false, fallback : ['libsoup', 'libsoup_dep'],
26 default_options: ['sysprof=disabled'])
27 libsoup3_dep = dependency('libsoup-3.0', required : false,
28 fallback : ['libsoup3', 'libsoup_dep'])
29 if not libsoup2_dep.found() and not libsoup3_dep.found()
31 error('Either libsoup2 or libsoup3 is needed')
35 if libsoup3_dep.found()
36 static_deps += libsoup3_dep
37 static_args += '-DSTATIC_SOUP=3'
38 message('soup plugin: using libsoup-3.0 for static build')
39 elif libsoup2_dep.found()
40 static_deps += libsoup2_dep
41 static_args += '-DSTATIC_SOUP=2'
42 message('soup plugin: using libsoup-2.4 for static build')
46 soup_library_kwargs = {
47 'sources' : soup_sources,
48 'link_args' : noseh_link_args,
49 'include_directories' : [configinc, libsinc],
51 'install_dir' : plugins_install_dir,
53 soup_library_deps = [gst_dep, gstbase_dep, gsttag_dep, gmodule_dep, gobject_dep, gio_dep, libdl_dep]
54 soup_library_c_args = gst_plugins_good_args
56 if default_library in ['shared', 'both']
57 gstsouphttpsrc_shared = shared_library('gstsoup',
58 c_args : soup_library_c_args,
59 dependencies : soup_library_deps,
60 kwargs: soup_library_kwargs,
64 if default_library in ['static', 'both']
65 gstsouphttpsrc_static = static_library('gstsoup',
66 c_args : soup_library_c_args + static_args,
67 dependencies : soup_library_deps + static_deps,
68 kwargs: soup_library_kwargs,
72 # Use the static library to generate the .pc file if it's available. The shared
73 # library .pc file does not have a Requires: on libsoup-2.4, and we use plugin
74 # .pc files to generate dependencies for linking plugins statically.
75 if default_library == 'shared'
76 pkgconfig.generate(gstsouphttpsrc_shared, install_dir : plugins_pkgconfig_install_dir)
78 pkgconfig.generate(gstsouphttpsrc_static, install_dir : plugins_pkgconfig_install_dir)
81 # Add the shared library to the plugins list if available. We pass this list of
82 # plugins to hotdoc to generate the plugins cache, which introspects the plugin
83 # by loading it. We need the shared plugin for that.
84 if default_library == 'static'
85 plugins += [gstsouphttpsrc_static]
87 plugins += [gstsouphttpsrc_shared]