From 29b0946c7ef61d13afdec59c46ce077df5a7748e Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Mon, 20 Sep 2021 16:00:03 +0600 Subject: [PATCH] Link ws2_32 only on Windows --- src/CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 08b441d3e..4114b3e11 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -41,7 +41,10 @@ endif() if(VNC) add_compile_definitions(USE_VNC) add_library(vnc OBJECT vnc.c vnc_keymap.c) - target_link_libraries(86Box vnc vncserver ws2_32) + target_link_libraries(86Box vnc vncserver) + if (WIN32) + target_link_libraries(86Box ws2_32) + endif() endif() if(NOT WIN32 OR PTHREAD)