fix win build 3

This commit is contained in:
t1amak
2025-12-10 15:24:32 +01:00
parent e7237ee496
commit d74b8fe864

View File

@@ -465,7 +465,8 @@ if (STATIC_BINARY OR STATIC_LIBS)
if (WIN32)
set(STATIC_LIBS ${STATIC_LIBS} ws2_32 iphlpapi userenv psapi dnsapi dbghelp)
if ((CMAKE_CXX_COMPILER_ID MATCHES GNU) OR (CMAKE_CXX_COMPILER_ID MATCHES Clang))
set(STATIC_LIBS ${STATIC_LIBS} bcrypt pthread)
# MinGW/Clang needs C++ runtime and winpthread explicitly when doing static link
set(STATIC_LIBS ${STATIC_LIBS} bcrypt pthread stdc++ winpthread)
endif()
elseif (CMAKE_SYSTEM_NAME STREQUAL FreeBSD)
set(STATIC_LIBS ${STATIC_LIBS} pthread)