Merge pull request #514 from SpaceIm/fix-mingw-link-ws2_32

CMake: explicit link to ws2_32 if targeting Windows
This commit is contained in:
Emiel Bruijntjes 2023-10-10 11:15:07 +02:00 committed by GitHub
commit 2448a2ad93
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -92,6 +92,10 @@ else()
add_library(${PROJECT_NAME} STATIC ${src_MAIN} ${src_LINUX_TCP})
endif()
if(WIN32)
target_link_libraries(${PROJECT_NAME} PUBLIC ws2_32)
endif()
# install rules
# ------------------------------------------------------------------------------------------------------