mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
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>
This commit is contained in:
parent
17bab9554d
commit
9a754972ed
1 changed files with 4 additions and 5 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue