diff options
-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") |