]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
fix: Fix static linkage with hiredis on Windows (#1041)
authorOrgad Shaneh <orgad.shaneh@audiocodes.com>
Tue, 12 Apr 2022 19:29:53 +0000 (22:29 +0300)
committerGitHub <noreply@github.com>
Tue, 12 Apr 2022 19:29:53 +0000 (21:29 +0200)
cmake/Findhiredis.cmake

index 46141d401a0464fc34bd83ee7cf0521e886a5d88..bcde4c2d5d030061d11d41890d9c3ab385458b36 100644 (file)
@@ -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)