diff options
author | Michael Grunder <michael.grunder@gmail.com> | 2022-06-26 16:49:19 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-26 16:49:19 -0700 |
commit | 8a15f4d6578560f2a375c32fc567c4c88335c2a8 (patch) | |
tree | 2f52d2d6ddb9612103feaaf01372793068a99ae7 | |
parent | 902dd047fe2f5e9ceb7936083c6d0506685e515f (diff) | |
parent | dd4bf97836d07df0a4502b72f9024d0231156711 (diff) |
Merge pull request #1057 from orgads/static-name
Use the same name for static and shared libraries
-rw-r--r-- | CMakeLists.txt | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 44829e3..ee149e6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -50,6 +50,11 @@ ADD_LIBRARY(hiredis_static STATIC ${hiredis_sources}) ADD_LIBRARY(hiredis::hiredis ALIAS hiredis) ADD_LIBRARY(hiredis::hiredis_static ALIAS hiredis_static) +IF(NOT MSVC) + SET_TARGET_PROPERTIES(hiredis_static + PROPERTIES OUTPUT_NAME hiredis) +ENDIF() + SET_TARGET_PROPERTIES(hiredis PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE VERSION "${HIREDIS_SONAME}") @@ -160,6 +165,10 @@ IF(ENABLE_SSL) ${hiredis_ssl_sources}) ADD_LIBRARY(hiredis_ssl_static STATIC ${hiredis_ssl_sources}) + IF(NOT MSVC) + SET_TARGET_PROPERTIES(hiredis_ssl_static + PROPERTIES OUTPUT_NAME hiredis_ssl) + ENDIF() IF (APPLE) SET_PROPERTY(TARGET hiredis_ssl PROPERTY LINK_FLAGS "-Wl,-undefined -Wl,dynamic_lookup") |