Spaces:
Running
Running
Kreijstal
commited on
cmake : Fix bug in httplib.h for mingw (#1615)
Browse filesFix bug in httlib.h for mingw, please see https://github.com/yhirose/cpp-httplib/issues/1669
examples/server/CMakeLists.txt
CHANGED
|
@@ -4,3 +4,9 @@ add_executable(${TARGET} server.cpp httplib.h json.hpp)
|
|
| 4 |
include(DefaultTargetOptions)
|
| 5 |
|
| 6 |
target_link_libraries(${TARGET} PRIVATE common whisper ${CMAKE_THREAD_LIBS_INIT})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
include(DefaultTargetOptions)
|
| 5 |
|
| 6 |
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()
|