Skip to content

Commit 6335933

Browse files
authored
cmake : Fix bug in httplib.h for mingw (#1615)
Fix bug in httlib.h for mingw, please see yhirose/cpp-httplib#1669
1 parent 885b556 commit 6335933

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

examples/server/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,9 @@ add_executable(${TARGET} server.cpp httplib.h json.hpp)
44
include(DefaultTargetOptions)
55

66
target_link_libraries(${TARGET} PRIVATE common whisper ${CMAKE_THREAD_LIBS_INIT})
7+
8+
# Check if the compiler is MinGW
9+
if(MINGW)
10+
# Link the necessary libraries for SSL and Winsock
11+
target_link_libraries(${TARGET} PRIVATE -lcrypt32 -lssl -lcrypto -lws2_32)
12+
endif()

0 commit comments

Comments
 (0)