diff options
author | Tomaz Canabrava <tomaz.canabrava@intel.com> | 2015-04-07 17:38:08 -0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-04-07 16:09:35 -0700 |
commit | 46990f4ac8840c26a5fda09b28b7b057f9b0e3b0 (patch) | |
tree | b15ceb31e784b6eb59f241565655b8d40ecbc46b /CMakeLists.txt | |
parent | 5a9931f438ba0a05b2dc084f400bb4743c7e60f4 (diff) | |
download | subsurface-46990f4ac8840c26a5fda09b28b7b057f9b0e3b0.tar.gz |
Simplify libgit handling on main CMakeLists.txt
We will use the OPTIONS variable to decide to find the
.a or the .so, so there's no need to do checks here.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index f22091fcb..329a5e19b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -34,13 +34,8 @@ pkg_config_library(LIBZIP libzip) if(NOT ${PREFER_GIT_FROMSOURCE}) pkg_config_library(LIBGIT2 libgit2) ELSE() - include_directories(${LIBGIT2DEVEL}/include) - link_directories(${LIBGIT2DEVEL}/build) - if(NOT DEFINED LIBGIT2STATIC) - set(SUBSURFACE_LINK_LIBRARIES ${SUBSURFACE_LINK_LIBRARIES} -lgit2 -lssl -lcrypto) - ELSE() - set(SUBSURFACE_LINK_LIBRARIES ${SUBSURFACE_LINK_LIBRARIES} libgit2.a -lssl -lcrypto) - ENDIF() + FIND_PACKAGE(LIBGIT2 REQUIRED) + INCLUDE_DIRECTORIES(${LIBGIT2_INCLUDE_DIRS}) ENDIF() SET(LIBDCDEVEL "" CACHE STRING "libraries") |