aboutsummaryrefslogtreecommitdiffstats
path: root/cmake/Modules/HandleFindGit2.cmake
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tomaz.canabrava@intel.com>2015-12-17 14:01:58 -0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-12-17 10:14:19 -0800
commitaa6d9f5ba00498f86fa2dbc11334cd8725234e71 (patch)
treed17e3630e21caf7e3538765126df9f1464d0d857 /cmake/Modules/HandleFindGit2.cmake
parentbbc7cbdf75c5ae27b20db0c201e87db06694ec4c (diff)
downloadsubsurface-aa6d9f5ba00498f86fa2dbc11334cd8725234e71.tar.gz
Code cleanup
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'cmake/Modules/HandleFindGit2.cmake')
-rw-r--r--cmake/Modules/HandleFindGit2.cmake46
1 files changed, 23 insertions, 23 deletions
diff --git a/cmake/Modules/HandleFindGit2.cmake b/cmake/Modules/HandleFindGit2.cmake
index 34db7b672..2f88b36dd 100644
--- a/cmake/Modules/HandleFindGit2.cmake
+++ b/cmake/Modules/HandleFindGit2.cmake
@@ -2,30 +2,30 @@
if(LIBGIT2_FROM_PKGCONFIG)
pkg_config_library(LIBGIT2 libgit2 REQUIRED)
set(LIBGIT2_LIBRARIES "")
- if(ANDROID)
- # for Android we need to force a static link against ssl and crypto
- # this is a bit hacky, but it seems to work
- set(LIBGIT2_LIBRARIES ${LIBGIT2_LIBRARIES} ${LIBGIT2_LIBRARY_DIRS}/libssl.a ${LIBGIT2_LIBRARY_DIRS}/libcrypto.a)
- endif()
- if(FORCE_LIBSSH)
- pkg_config_library(LIBSSH2 libssh2 REQUIRED)
- set(LIBGIT2_LIBRARIES ${LIBGIT2_LIBRARIES} ${LIBSSH2_LIBRARIES})
- endif()
+ if(ANDROID)
+ # for Android we need to force a static link against ssl and crypto
+ # this is a bit hacky, but it seems to work
+ set(LIBGIT2_LIBRARIES ${LIBGIT2_LIBRARIES} ${LIBGIT2_LIBRARY_DIRS}/libssl.a ${LIBGIT2_LIBRARY_DIRS}/libcrypto.a)
+ endif()
+ if(FORCE_LIBSSH)
+ pkg_config_library(LIBSSH2 libssh2 REQUIRED)
+ set(LIBGIT2_LIBRARIES ${LIBGIT2_LIBRARIES} ${LIBSSH2_LIBRARIES})
+ endif()
else()
find_package(LIBGIT2 REQUIRED)
include_directories(${LIBGIT2_INCLUDE_DIR})
- if(FORCE_LIBSSH)
- find_package(Libssh2 QUIET CONFIG)
- if ("${LIBSSH2_VERSION}" STRGREATER "1.6.1")
- set(LIBSSH2_LIBRARIES Libssh2::libssh2)
- endif()
- if(!LIBSSH2_FOUND OR "${LIBSSH2_FOUND}" STREQUAL "")
- pkg_config_library(LIBSSH2 libssh2 REQUIRED)
- endif()
- endif()
- find_package(libcurl QUIET)
- if(!LIBCURL_FOUND OR "${LIBCURL_FOUND}" STREQUAL "")
- pkg_config_library(LIBCURL libcurl REQUIRED)
- endif()
- set(LIBGIT2_LIBRARIES ${LIBGIT2_LIBRARIES} -L${LIBSSH2_LIBRARY_DIRS} ${LIBSSH2_LIBRARIES} ${LIBCURL_LIBRARIES})
+ if(FORCE_LIBSSH)
+ find_package(Libssh2 QUIET CONFIG)
+ if ("${LIBSSH2_VERSION}" STRGREATER "1.6.1")
+ set(LIBSSH2_LIBRARIES Libssh2::libssh2)
+ endif()
+ if(!LIBSSH2_FOUND OR "${LIBSSH2_FOUND}" STREQUAL "")
+ pkg_config_library(LIBSSH2 libssh2 REQUIRED)
+ endif()
+ endif()
+ find_package(libcurl QUIET)
+ if(!LIBCURL_FOUND OR "${LIBCURL_FOUND}" STREQUAL "")
+ pkg_config_library(LIBCURL libcurl REQUIRED)
+ endif()
+ set(LIBGIT2_LIBRARIES ${LIBGIT2_LIBRARIES} -L${LIBSSH2_LIBRARY_DIRS} ${LIBSSH2_LIBRARIES} ${LIBCURL_LIBRARIES})
endif()