soup: Re-add soup-lookup-dep option
authorNirbheek Chauhan <nirbheek@centricular.com>
Fri, 23 Feb 2024 06:15:50 +0000 (11:45 +0530)
committerNirbheek Chauhan <nirbheek@centricular.com>
Fri, 23 Feb 2024 06:17:47 +0000 (11:47 +0530)
It's still useful on Linux since it ensures that the tests are going
to be built, since they use the same dep lookup as the plugin now.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6197>

.gitlab-ci.yml
subprojects/gst-plugins-good/ext/soup/meson.build
subprojects/gst-plugins-good/meson_options.txt

index fa5a750963b6be6890442109da6683e9dbffdce7..d3c1db1b3f936a1267347bc3f881c1e95f734bc8 100644 (file)
@@ -45,6 +45,7 @@ variables:
     -Dlibnice:examples=disabled
     -Dlibnice:gupnp=disabled
     -Dopenh264:tests=disabled
+    -Dgst-plugins-good:soup-lookup-dep=true
     -Dpygobject:tests=false
     -Dpython=enabled
     -Dlibav=enabled
index 075fe91d7b543da7597a573a9b563ce06cebaa8f..aaa01dbcf630f50b529e5da302a2822c5d2fa151 100644 (file)
@@ -20,7 +20,8 @@ soup_link_deps = []
 libsoup2_dep = disabler()
 libsoup3_dep = disabler()
 default_library = get_option('default_library')
-if host_system != 'linux' or default_library in ['static', 'both']
+soup_lookup_dep = get_option('soup-lookup-dep') and host_system == 'linux'
+if host_system != 'linux' or default_library in ['static', 'both'] or soup_lookup_dep
   if soup_ver_opt in ['auto', '3']
     libsoup3_dep = dependency('libsoup-3.0', allow_fallback: true,
                               required: soup_ver_opt == '3' and soup_opt.enabled())
@@ -30,7 +31,9 @@ if host_system != 'linux' or default_library in ['static', 'both']
                               default_options: ['sysprof=disabled'],
                               required: soup_ver_opt == '2' and soup_opt.enabled())
   endif
+endif
 
+if host_system != 'linux' or default_library in ['static', 'both']
   if libsoup3_dep.found()
     soup_link_deps += libsoup3_dep
     soup_link_args += '-DLINK_SOUP=3'
index a4e15ed805313819db572af0125026e94a69f06a..a03a9b0a450f757c3c80e1cb1952a23e7aa4ebea 100644 (file)
@@ -87,6 +87,8 @@ option('rpi-lib-dir', type : 'string', value : '/opt/vc/lib', description : 'Dir
 
 # soup plugin options
 option('soup', type : 'feature', value : 'auto', description : 'libsoup HTTP client source/sink plugin')
+option('soup-lookup-dep', type : 'boolean', value : false,
+       description : 'Lookup libsoup dep at build time even when building a shared plugin')
 option('soup-version', type : 'combo', value : 'auto', choices : ['auto', '2', '3'],
        description: 'Force a specific libsoup version if linking to it (N/A for shared builds on Linux)')