soup: Don't error out in static build unless option is enabled

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1846>
This commit is contained in:
Nirbheek Chauhan 2022-03-02 23:11:09 +05:30 committed by Tim-Philipp Müller
parent 496aa91a5e
commit 06e79311c5

View file

@ -26,7 +26,9 @@ if get_option('default_library') == 'static'
libsoup3_dep = dependency('libsoup-3.0', required : false,
fallback : ['libsoup3', 'libsoup_dep'])
if not libsoup2_dep.found() and not libsoup3_dep.found()
error('Either libsoup2 or libsoup3 is needed')
if soup_opt.enabled()
error('Either libsoup2 or libsoup3 is needed')
endif
subdir_done()
endif
if libsoup3_dep.found()