We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent af2993b commit e47313dCopy full SHA for e47313d
redis/CMakeLists.txt
@@ -15,5 +15,12 @@ ENDIF ()
15
16
# Compile and link libgit2
17
INCLUDE_DIRECTORIES(${LIBGIT2_INCLUDE_DIRS} ${LIBHIREDIS_INCLUDE_DIRS})
18
-ADD_LIBRARY(git2-redis hiredis.c)
+
19
+ADD_LIBRARY(core OBJECT hiredis.c)
20
+IF (BUILD_SHARED_LIBS)
21
+ ADD_LIBRARY(git2-redis SHARED $<TARGET_OBJECTS:core>)
22
+ELSE ()
23
+ ADD_LIBRARY(git2-redis STATIC $<TARGET_OBJECTS:core>)
24
+ENDIF ()
25
26
TARGET_LINK_LIBRARIES(git2-redis ${LIBGIT2_LIBRARIES} ${LIBHIREDIS_LIBRARIES})
0 commit comments