meson: Link with ws2_32 for socket functions on Windows

This commit is contained in:
Jon Turney 2019-04-26 00:46:09 +01:00 committed by Adam Jackson
parent d21224cd15
commit 92a52611f6
2 changed files with 7 additions and 0 deletions

View File

@ -14,6 +14,7 @@ xwin_clipboard = static_library(
dependencies: [
dependency('x11'),
dependency('xfixes'),
socket_dep,
],
)

View File

@ -525,6 +525,12 @@ if get_option('xselinux') != 'false'
endif
endif
socket_dep = []
if host_machine.system() == 'windows'
socket_dep = meson.get_compiler('c').find_library('ws2_32')
common_dep += socket_dep
endif
glx_inc = include_directories('glx')
top_srcdir_inc = include_directories('.')