Skip to content

Commit

Permalink
cmake : Fix bug in httplib.h for mingw (ggerganov#1615)
Browse files Browse the repository at this point in the history
Fix bug in httlib.h for mingw, please see yhirose/cpp-httplib#1669
  • Loading branch information
Kreijstal authored and iThalay committed Sep 23, 2024
1 parent 0265c06 commit ba806b4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions examples/server/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,9 @@ add_executable(${TARGET} server.cpp httplib.h json.hpp)
include(DefaultTargetOptions)

target_link_libraries(${TARGET} PRIVATE common whisper ${CMAKE_THREAD_LIBS_INIT})

# Check if the compiler is MinGW
if(MINGW)
# Link the necessary libraries for SSL and Winsock
target_link_libraries(${TARGET} PRIVATE -lcrypt32 -lssl -lcrypto -lws2_32)
endif()

0 comments on commit ba806b4

Please sign in to comment.