Skip to content

Commit c9b2e9b

Browse files
angt0Marble
authored andcommitted
cmake: explicitly link against crypt32 on non-MSVC Windows builds (ggml-org#17727)
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 <angt@huggingface.co>
1 parent 48cd636 commit c9b2e9b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

vendor/cpp-httplib/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,4 +144,7 @@ if (CPPHTTPLIB_OPENSSL_SUPPORT)
144144
find_library(SECURITY_FRAMEWORK Security REQUIRED)
145145
target_link_libraries(${TARGET} PUBLIC ${CORE_FOUNDATION_FRAMEWORK} ${SECURITY_FRAMEWORK})
146146
endif()
147+
if (WIN32 AND NOT MSVC)
148+
target_link_libraries(${TARGET} PUBLIC crypt32)
149+
endif()
147150
endif()

0 commit comments

Comments
 (0)