Skip to content

Commit 8a15f4d

Browse files
Merge pull request #1057 from orgads/static-name
Use the same name for static and shared libraries
2 parents 902dd04 + dd4bf97 commit 8a15f4d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

CMakeLists.txt

+9
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@ ADD_LIBRARY(hiredis_static STATIC ${hiredis_sources})
5050
ADD_LIBRARY(hiredis::hiredis ALIAS hiredis)
5151
ADD_LIBRARY(hiredis::hiredis_static ALIAS hiredis_static)
5252

53+
IF(NOT MSVC)
54+
SET_TARGET_PROPERTIES(hiredis_static
55+
PROPERTIES OUTPUT_NAME hiredis)
56+
ENDIF()
57+
5358
SET_TARGET_PROPERTIES(hiredis
5459
PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE
5560
VERSION "${HIREDIS_SONAME}")
@@ -160,6 +165,10 @@ IF(ENABLE_SSL)
160165
${hiredis_ssl_sources})
161166
ADD_LIBRARY(hiredis_ssl_static STATIC
162167
${hiredis_ssl_sources})
168+
IF(NOT MSVC)
169+
SET_TARGET_PROPERTIES(hiredis_ssl_static
170+
PROPERTIES OUTPUT_NAME hiredis_ssl)
171+
ENDIF()
163172

164173
IF (APPLE)
165174
SET_PROPERTY(TARGET hiredis_ssl PROPERTY LINK_FLAGS "-Wl,-undefined -Wl,dynamic_lookup")

0 commit comments

Comments
 (0)