]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commitdiff
cmake : Fix bug in httplib.h for mingw (#1615)
authorKreijstal <redacted>
Sun, 10 Dec 2023 17:47:52 +0000 (18:47 +0100)
committerGitHub <redacted>
Sun, 10 Dec 2023 17:47:52 +0000 (17:47 +0000)
Fix bug in httlib.h for mingw, please see https://github.com/yhirose/cpp-httplib/issues/1669

examples/server/CMakeLists.txt

index 9b1e66550d91f7f0cd34c3b0adafa31dd2acc94a..f53022765269896f46104e215decf3422c92bee6 100644 (file)
@@ -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()