summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOrgad Shaneh <orgad.shaneh@audiocodes.com>2022-04-12 22:29:53 +0300
committerGitHub <noreply@github.com>2022-04-12 21:29:53 +0200
commit7f1572ae9ca958fa923a66235f6a64a360b03523 (patch)
treea0c26577835f361a8f522318a1b18a36c8f8ee50
parent2ba8445b358a40753809495aae07ac1b3169d746 (diff)
downloadccache-7f1572ae9ca958fa923a66235f6a64a360b03523.tar.gz
fix: Fix static linkage with hiredis on Windows (#1041)
-rw-r--r--cmake/Findhiredis.cmake3
1 files changed, 3 insertions, 0 deletions
diff --git a/cmake/Findhiredis.cmake b/cmake/Findhiredis.cmake
index 46141d40..bcde4c2d 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)