File tree Expand file tree Collapse file tree 3 files changed +522
-123
lines changed Expand file tree Collapse file tree 3 files changed +522
-123
lines changed Original file line number Diff line number Diff line change 99
1010# use pkg-config to get the directories and then use these values
1111# 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)
1414
1515SET (LIBGIT2_DEFINITIONS ${PC_LIBGIT2_CFLAGS_OTHER} )
1616
Original file line number Diff line number Diff line change @@ -14,6 +14,12 @@ IF (NOT CMAKE_BUILD_TYPE)
1414ENDIF ()
1515
1616# 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+
1925TARGET_LINK_LIBRARIES (git2-redis ${LIBGIT2_LIBRARIES} ${LIBHIREDIS_LIBRARIES} )
You can’t perform that action at this time.
0 commit comments