From: Kreijstal Date: Sun, 10 Dec 2023 17:47:52 +0000 (+0100) Subject: cmake : Fix bug in httplib.h for mingw (#1615) X-Git-Tag: upstream/1.7.4~1207 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=6335933a5b2dfdac8541d3e748201d1bc1e3ec50;p=pkg%2Fggml%2Fsources%2Fwhisper.cpp cmake : Fix bug in httplib.h for mingw (#1615) Fix bug in httlib.h for mingw, please see https://github.com/yhirose/cpp-httplib/issues/1669 --- diff --git a/examples/server/CMakeLists.txt b/examples/server/CMakeLists.txt index 9b1e6655..f5302276 100644 --- a/examples/server/CMakeLists.txt +++ b/examples/server/CMakeLists.txt @@ -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()