summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Anton Lundin <glance@acc.umu.se>2015-07-16 00:59:34 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-07-16 14:09:31 -0700
commit9a754972ed2f45733aace842d4cb87016a6ef803 (patch)
tree2b3260952eb380ed22412c2bc89c4bb8feb53ea6
parent17bab9554ddeff98997e61eac68367a8dfe0c36e (diff)
downloadsubsurface-9a754972ed2f45733aace842d4cb87016a6ef803.tar.gz
Fix libssh libssl linker order for Android
We need to link things in the correct order, even on android. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--CMakeLists.txt9
1 files changed, 4 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0bd223261..ab7be1bfc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -55,16 +55,15 @@ if(LIBGIT2_FROM_PKGCONFIG)
if(USE_LIBGIT23_API)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DUSE_LIBGIT23_API")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DUSE_LIBGIT23_API")
- 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()
endif()
else()
find_package(LIBGIT2 REQUIRED)