summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-02-23 09:04:52 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-02-23 09:31:08 -0800
commit62999c866f993bacadbbcad8aaf9a191f440dd1a (patch)
tree9a2b3f607f0ea6d1ec0c893bc57a1cc2f8cdc361 /CMakeLists.txt
parentcd545e1075d60e08d074668111a45d02fade5723 (diff)
downloadsubsurface-62999c866f993bacadbbcad8aaf9a191f440dd1a.tar.gz
Add LIBGITDEVEL support to CMakeLists.txt
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt12
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")