diff options
-rw-r--r-- | CMakeLists.txt | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 0f2902d1b..0707ca6e3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,7 +22,17 @@ ENDMACRO() pkg_config_library(LIBXML libxml-2.0) pkg_config_library(LIBSQLITE3 sqlite3) -pkg_config_library(LIBGIT2 libgit2) +if(LIBGIT2DEVEL STREQUAL "") + pkg_config_library(LIBGIT2 libgit2) +ELSE() + include_directories(${LIBGIT2DEVEL}/include) + link_directories(${LIBGIT2DEVEL}/build) + if(LIBGIT2STATIC STREQUAL "") + set(SUBSURFACE_LINK_LIBRARIES ${SUBSURFACE_LINK_LIBRARIES} libgit2.so libssl.so libcrypto.so) + ELSE() + set(SUBSURFACE_LINK_LIBRARIES ${SUBSURFACE_LINK_LIBRARIES} libgit2.a libssl.so libcrypto.so) + ENDIF() +ENDIF() pkg_config_library(LIBXSLT libxslt) SET(LIBDCDEVEL "" CACHE STRING "libraries") |