chore(server): link winsock2 for non-MSVC windows (#1378)

This commit is contained in:
Jan Ekström 2026-03-31 17:10:34 +03:00 committed by GitHub
parent 1d6cb0f8c3
commit 4d5232083f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -70,4 +70,10 @@ endif()
install(TARGETS ${TARGET} RUNTIME) install(TARGETS ${TARGET} RUNTIME)
target_link_libraries(${TARGET} PRIVATE stable-diffusion ${CMAKE_THREAD_LIBS_INIT}) target_link_libraries(${TARGET} PRIVATE stable-diffusion ${CMAKE_THREAD_LIBS_INIT})
# due to httplib; it contains a pragma for MSVC, but other things need explicit flags
if(WIN32 AND NOT MSVC)
target_link_libraries(${TARGET} PRIVATE ws2_32)
endif()
target_compile_features(${TARGET} PUBLIC c_std_11 cxx_std_17) target_compile_features(${TARGET} PUBLIC c_std_11 cxx_std_17)