Skip to content

Commit

Permalink
Fix Win32
Browse files Browse the repository at this point in the history
  • Loading branch information
danoli3 committed Jul 9, 2024
1 parent 7fc614b commit 0485dc5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -614,6 +614,10 @@ endif()
if (MSVC)
target_compile_options(${PROJECT_NAME} PRIVATE /MP)
endif()
if (WIN32)
# Add ws2_32.lib for Windows builds
target_link_libraries(${PROJECT_NAME} ws2_32)
endif()

# Test suite
if (BUILD_TESTS)
Expand Down
5 changes: 5 additions & 0 deletions TestAPI/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,10 @@ if (BUILD_TESTS)
if (DEFINED ZLIB_LIBRARY)
target_link_libraries(MainTestSuite ${ZLIB_LIBRARY})
endif()
if (WIN32)
# Add ws2_32.lib for Windows builds
target_link_libraries(${MainTestSuite} ws2_32)
endif()

add_test(NAME MainTestSuite WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/TestAPI COMMAND $<TARGET_FILE:MainTestSuite>)
endif ()

0 comments on commit 0485dc5

Please sign in to comment.