2019-12-24 04:18:50 +08:00
|
|
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
2023-06-15 03:31:04 +08:00
|
|
|
index 3d52d0c..d175f0a 100644
|
2019-12-24 04:18:50 +08:00
|
|
|
--- a/CMakeLists.txt
|
|
|
|
+++ b/CMakeLists.txt
|
2023-06-15 03:31:04 +08:00
|
|
|
@@ -44,14 +44,13 @@ IF(WIN32)
|
|
|
|
ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS -DWIN32_LEAN_AND_MEAN)
|
2020-12-01 02:17:12 +08:00
|
|
|
ENDIF()
|
2019-12-24 04:18:50 +08:00
|
|
|
|
2020-12-01 02:17:12 +08:00
|
|
|
-ADD_LIBRARY(hiredis SHARED ${hiredis_sources})
|
|
|
|
+ADD_LIBRARY(hiredis ${hiredis_sources})
|
2023-06-15 03:31:04 +08:00
|
|
|
ADD_LIBRARY(hiredis_static STATIC ${hiredis_sources})
|
|
|
|
+SET_TARGET_PROPERTIES(hiredis_static PROPERTIES EXCLUDE_FROM_ALL TRUE)
|
|
|
|
ADD_LIBRARY(hiredis::hiredis ALIAS hiredis)
|
|
|
|
ADD_LIBRARY(hiredis::hiredis_static ALIAS hiredis_static)
|
2019-12-24 04:18:50 +08:00
|
|
|
|
2023-06-15 03:31:04 +08:00
|
|
|
IF(NOT MSVC)
|
|
|
|
- SET_TARGET_PROPERTIES(hiredis_static
|
|
|
|
- PROPERTIES OUTPUT_NAME hiredis)
|
|
|
|
ENDIF()
|
|
|
|
|
|
|
|
SET_TARGET_PROPERTIES(hiredis
|
|
|
|
@@ -103,7 +102,7 @@ set(CPACK_RPM_PACKAGE_AUTOREQPROV ON)
|
|
|
|
|
|
|
|
include(CPack)
|
|
|
|
|
|
|
|
-INSTALL(TARGETS hiredis hiredis_static
|
|
|
|
+INSTALL(TARGETS hiredis
|
|
|
|
EXPORT hiredis-targets
|
|
|
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
|
|
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
|
|
@@ -161,13 +160,12 @@ IF(ENABLE_SSL)
|
|
|
|
FIND_PACKAGE(OpenSSL REQUIRED)
|
|
|
|
SET(hiredis_ssl_sources
|
2020-12-01 02:17:12 +08:00
|
|
|
ssl.c)
|
2019-12-24 04:18:50 +08:00
|
|
|
- ADD_LIBRARY(hiredis_ssl SHARED
|
|
|
|
+ ADD_LIBRARY(hiredis_ssl
|
2020-12-01 02:17:12 +08:00
|
|
|
${hiredis_ssl_sources})
|
2023-06-15 03:31:04 +08:00
|
|
|
ADD_LIBRARY(hiredis_ssl_static STATIC
|
|
|
|
${hiredis_ssl_sources})
|
|
|
|
+ SET_TARGET_PROPERTIES(hiredis_ssl_static PROPERTIES EXCLUDE_FROM_ALL TRUE)
|
|
|
|
IF(NOT MSVC)
|
|
|
|
- SET_TARGET_PROPERTIES(hiredis_ssl_static
|
|
|
|
- PROPERTIES OUTPUT_NAME hiredis_ssl)
|
|
|
|
ENDIF()
|
|
|
|
|
|
|
|
IF (APPLE)
|
|
|
|
@@ -193,7 +191,7 @@ IF(ENABLE_SSL)
|
|
|
|
ENDIF()
|
|
|
|
CONFIGURE_FILE(hiredis_ssl.pc.in hiredis_ssl.pc @ONLY)
|
2020-12-01 02:17:12 +08:00
|
|
|
|
2023-06-15 03:31:04 +08:00
|
|
|
- INSTALL(TARGETS hiredis_ssl hiredis_ssl_static
|
|
|
|
+ INSTALL(TARGETS hiredis_ssl
|
|
|
|
EXPORT hiredis_ssl-targets
|
|
|
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
|
|
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|