$NetBSD: patch-booster_CMakeLists.txt,v 1.2 2022/12/21 15:21:28 wiz Exp $

--- booster/CMakeLists.txt.orig	2018-05-16 15:05:27.000000000 +0000
+++ booster/CMakeLists.txt
@@ -251,6 +251,7 @@ endif()
 
 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX_FLAGS}")
 
+	find_library(WSOCK32 wsock32)
 #############################################################################
 #
 # Set default RelWithDebInfo build
@@ -393,7 +394,7 @@ check_cxx_source_compiles(
 	BOOSTER_HAVE_INTTYPES_H)
 
 if(IS_WINDOWS)
-	set(CMAKE_REQUIRED_LIBRARIES ${WS2_32})
+	set(CMAKE_REQUIRED_LIBRARIES ${WS2_32} ${WSOCK32})
 	check_cxx_source_compiles(
 	"#include <ws2tcpip.h>
     #include <winsock2.h>
@@ -599,9 +600,6 @@ foreach(ALIB ${LINK_LIBS})
 	if(LIB_PTHREAD)
 		target_link_libraries(${ALIB} ${LIB_PTHREAD})
 	endif(LIB_PTHREAD)
-	if(WS2_32)
-		target_link_libraries(${ALIB} ${WS2_32})
-	endif()
 	target_link_libraries(${ALIB} ${PCRE_LIB})
 
 	if(NOT DISABLE_ICU_LOCALE)
@@ -624,6 +622,8 @@ foreach(ALIB ${LINK_LIBS})
 
   	if(IS_WINDOWS)
 		target_link_libraries(${ALIB} psapi)
+		target_link_libraries(${ALIB} ws2_32)
+		target_link_libraries(${ALIB} wsock32)
 	endif()
 	
 	if(STLPORT_LIB)
