2019-12-24 04:18:50 +08:00
|
|
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
2023-08-01 02:31:48 +08:00
|
|
|
index b7d6ee8..8cf6c4d 100644
|
2019-12-24 04:18:50 +08:00
|
|
|
--- a/CMakeLists.txt
|
|
|
|
+++ b/CMakeLists.txt
|
2023-08-01 02:31:48 +08:00
|
|
|
@@ -45,6 +45,8 @@ ENDIF()
|
2019-12-24 04:18:50 +08:00
|
|
|
|
2023-08-01 02:31:48 +08:00
|
|
|
ADD_LIBRARY(hiredis ${hiredis_sources})
|
2023-06-15 03:31:04 +08:00
|
|
|
ADD_LIBRARY(hiredis::hiredis ALIAS hiredis)
|
2023-08-01 02:31:48 +08:00
|
|
|
+ADD_LIBRARY(hiredis_static STATIC ${hiredis_sources})
|
|
|
|
+SET_TARGET_PROPERTIES(hiredis_static PROPERTIES EXCLUDE_FROM_ALL TRUE)
|
|
|
|
set(hiredis_export_name hiredis CACHE STRING "Name of the exported target")
|
|
|
|
set_target_properties(hiredis PROPERTIES EXPORT_NAME ${hiredis_export_name})
|
2023-06-15 03:31:04 +08:00
|
|
|
|
2023-08-01 02:31:48 +08:00
|
|
|
@@ -156,6 +158,8 @@ IF(ENABLE_SSL)
|
2020-11-30 13:17:12 -05:00
|
|
|
ssl.c)
|
2023-08-01 02:31:48 +08:00
|
|
|
ADD_LIBRARY(hiredis_ssl ${hiredis_ssl_sources})
|
|
|
|
ADD_LIBRARY(hiredis::hiredis_ssl ALIAS hiredis_ssl)
|
|
|
|
+ ADD_LIBRARY(hiredis_ssl_static STATIC ${hiredis_ssl_sources})
|
2023-06-15 03:31:04 +08:00
|
|
|
+ SET_TARGET_PROPERTIES(hiredis_ssl_static PROPERTIES EXCLUDE_FROM_ALL TRUE)
|
2020-11-30 13:17:12 -05:00
|
|
|
|
2023-08-01 02:31:48 +08:00
|
|
|
IF (APPLE AND BUILD_SHARED_LIBS)
|
|
|
|
SET_PROPERTY(TARGET hiredis_ssl PROPERTY LINK_FLAGS "-Wl,-undefined -Wl,dynamic_lookup")
|