summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlessio M <masariello@gmail.com>2020-09-04 09:37:11 +0100
committerAlessio M <masariello@gmail.com>2020-09-07 23:27:45 +0100
commit1b40ec509628c73ac272c8599a3c923e34800d54 (patch)
tree03e9d7de47ffab8e800b05143f9bbc0f165e36c8
parentd7b1d21e807f8a90a086b2ef5cea9b707d4cc858 (diff)
fixed issue with unit test linking on windows with SSL
-rw-r--r--CMakeLists.txt4
1 files changed, 3 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4bdee18..53e9f58 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -50,7 +50,8 @@ SET_TARGET_PROPERTIES(hiredis
PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE
VERSION "${HIREDIS_SONAME}")
IF(WIN32 OR MINGW)
- TARGET_LINK_LIBRARIES(hiredis PRIVATE ws2_32)
+ TARGET_LINK_LIBRARIES(hiredis PUBLIC ws2_32 crypt32)
+ TARGET_LINK_LIBRARIES(hiredis_static PUBLIC ws2_32 crypt32)
ENDIF()
TARGET_INCLUDE_DIRECTORIES(hiredis PUBLIC $<INSTALL_INTERFACE:include> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)
@@ -152,6 +153,7 @@ IF(ENABLE_SSL)
TARGET_LINK_LIBRARIES(hiredis_ssl PRIVATE ${OPENSSL_LIBRARIES})
IF (WIN32 OR MINGW)
TARGET_LINK_LIBRARIES(hiredis_ssl PRIVATE hiredis)
+ TARGET_LINK_LIBRARIES(hiredis_ssl_static PUBLIC hiredis_static)
ENDIF()
CONFIGURE_FILE(hiredis_ssl.pc.in hiredis_ssl.pc @ONLY)