From 7f1572ae9ca958fa923a66235f6a64a360b03523 Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Tue, 12 Apr 2022 22:29:53 +0300 Subject: [PATCH] fix: Fix static linkage with hiredis on Windows (#1041) --- cmake/Findhiredis.cmake | 3 +++ 1 file changed, 3 insertions(+) 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) -- 2.47.2