meson: add winsock2 library on windows builds

If building for windows with curl disabled we get build failures due to
missing ws2_32 library needed for winsock2.

Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
Daniel P. Berrangé 2020-12-01 20:15:20 +00:00
parent eeb0c9aef0
commit 143d2e9bde

View File

@ -1368,10 +1368,12 @@ libutil_dep = cc.find_library('util', required: false)
if host_machine.system() == 'windows'
ole32_dep = cc.find_library('ole32')
oleaut32_dep = cc.find_library('oleaut32')
winsock2_dep = cc.find_library('ws2_32')
win32_dep = declare_dependency(
dependencies: [
ole32_dep,
oleaut32_dep,
winsock2_dep,
],
)
if get_option('default_library') == 'static'