]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
cmake: explicitly link against crypt32 on non-MSVC Windows builds (#17727)
authorAdrien Gallouët <redacted>
Wed, 3 Dec 2025 13:47:02 +0000 (14:47 +0100)
committerGitHub <redacted>
Wed, 3 Dec 2025 13:47:02 +0000 (15:47 +0200)
Some toolchains do not support linking via pragmas such as:

    #pragma comment(lib, "crypt32.lib")

so we need to add the library explicitly.

Signed-off-by: Adrien Gallouët <redacted>
vendor/cpp-httplib/CMakeLists.txt

index 8e1cd9a9dae61f87e22bc5925030c36aa7bd1c26..369502d7aecd40b0fe8ed30d59767434f6feb9fe 100644 (file)
@@ -144,4 +144,7 @@ if (CPPHTTPLIB_OPENSSL_SUPPORT)
         find_library(SECURITY_FRAMEWORK Security REQUIRED)
         target_link_libraries(${TARGET} PUBLIC ${CORE_FOUNDATION_FRAMEWORK} ${SECURITY_FRAMEWORK})
     endif()
+    if (WIN32 AND NOT MSVC)
+        target_link_libraries(${TARGET} PUBLIC crypt32)
+    endif()
 endif()