win32: cmake: link to Winsocket lib

This commit is contained in:
NeroBurner 2020-02-18 13:42:39 +01:00 committed by Reinhold Gschweicher
parent 585d021d1f
commit 5eaa5324f5
1 changed files with 5 additions and 0 deletions

View File

@ -71,6 +71,11 @@ foreach(exe vban_receptor vban_emitter vban_sendtext)
target_link_libraries( ${exe} PRIVATE ${JACK_LIBRARIES})
endif()
if(WIN32)
# Windows has no sys/socket.h, need to use Winsock2.h and link to lib
target_link_libraries( ${exe} PRIVATE ws2_32)
endif()
install(TARGETS ${exe} DESTINATION "${CMAKE_INSTALL_BINDIR}")
endforeach()