summaryrefslogtreecommitdiffstats
path: root/cmake/Modules/FindLIBGIT2.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/Modules/FindLIBGIT2.cmake')
-rw-r--r--cmake/Modules/FindLIBGIT2.cmake7
1 files changed, 6 insertions, 1 deletions
diff --git a/cmake/Modules/FindLIBGIT2.cmake b/cmake/Modules/FindLIBGIT2.cmake
index cedb96d36..da51cc497 100644
--- a/cmake/Modules/FindLIBGIT2.cmake
+++ b/cmake/Modules/FindLIBGIT2.cmake
@@ -22,8 +22,13 @@ HINTS
/usr/include
)
+IF ( LIBGIT2_DYNAMIC )
+ SET( LIBGIT2_SO libgit2.so )
+ENDIF()
+
FIND_LIBRARY( LIBGIT2_LIBRARIES
NAMES
+ ${LIBGIT2_SO}
libgit2.a
git2
HINTS
@@ -36,4 +41,4 @@ SET(LIBGIT2_LIBRARIES ${LIBGIT2_LIBRARIES} -lssl -lcrypto)
INCLUDE( FindPackageHandleStandardArgs )
FIND_PACKAGE_HANDLE_STANDARD_ARGS( git2 DEFAULT_MSG LIBGIT2_INCLUDE_DIR LIBGIT2_LIBRARIES )
-include_directories(${LIBGIT2_INCLUDE_DIR}}) \ No newline at end of file
+include_directories(${LIBGIT2_INCLUDE_DIR}})