From: Orgad Shaneh Date: Tue, 12 Apr 2022 19:29:53 +0000 (+0300) Subject: fix: Fix static linkage with hiredis on Windows (#1041) X-Git-Tag: v4.6.1~36 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7f1572ae9ca958fa923a66235f6a64a360b03523;p=thirdparty%2Fccache.git fix: Fix static linkage with hiredis on Windows (#1041) --- diff --git a/cmake/Findhiredis.cmake b/cmake/Findhiredis.cmake index 46141d401..bcde4c2d5 100644 --- a/cmake/Findhiredis.cmake +++ b/cmake/Findhiredis.cmake @@ -74,6 +74,9 @@ else() IMPORTED_LOCATION "${HIREDIS_LIBRARY}" INTERFACE_COMPILE_OPTIONS "${HIREDIS_CFLAGS_OTHER}" INTERFACE_INCLUDE_DIRECTORIES "${HIREDIS_INCLUDE_DIR}") + if(WIN32 AND STATIC_LINK) + target_link_libraries(HIREDIS::HIREDIS INTERFACE ws2_32) + endif() endif() include(FeatureSummary)