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>
This commit is contained in:
Tomaz Canabrava 2015-04-07 17:38:08 -03:00 committed by Dirk Hohndel
parent 5a9931f438
commit 46990f4ac8

View file

@ -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")