File tree 3 files changed +522
-123
lines changed
3 files changed +522
-123
lines changed Original file line number Diff line number Diff line change 9
9
10
10
# use pkg-config to get the directories and then use these values
11
11
# in the FIND_PATH() and FIND_LIBRARY() calls
12
- FIND_PACKAGE (PkgConfig)
13
- PKG_SEARCH_MODULE(PC_LIBGIT2 libgit2)
12
+ # FIND_PACKAGE(PkgConfig)
13
+ # PKG_SEARCH_MODULE(PC_LIBGIT2 libgit2)
14
14
15
15
SET (LIBGIT2_DEFINITIONS ${PC_LIBGIT2_CFLAGS_OTHER} )
16
16
Original file line number Diff line number Diff line change @@ -14,6 +14,12 @@ IF (NOT CMAKE_BUILD_TYPE)
14
14
ENDIF ()
15
15
16
16
# Compile and link libgit2
17
- INCLUDE_DIRECTORIES (${LIBGIT2_INCLUDE_DIRS} ${LIBHIREDIS_INCLUDE_DIRS} )
18
- ADD_LIBRARY (git2-redis hiredis.c)
17
+ INCLUDE_DIRECTORIES (${LIBGIT2_INCLUDE_DIR} ${LIBHIREDIS_INCLUDE_DIR} )
18
+
19
+ IF (BUILD_SHARED_LIBS )
20
+ ADD_LIBRARY (git2-redis SHARED hiredis.c)
21
+ ELSE ()
22
+ ADD_LIBRARY (git2-redis STATIC hiredis.c)
23
+ ENDIF ()
24
+
19
25
TARGET_LINK_LIBRARIES (git2-redis ${LIBGIT2_LIBRARIES} ${LIBHIREDIS_LIBRARIES} )
You can’t perform that action at this time.
0 commit comments