Renamed OpenSSL library

To avoid collisions with system provided OpenSSL use
a different (unique) library name for android builds.
This commit is contained in:
Armin Novak 2017-01-16 16:39:06 +01:00
parent 62544e0b8a
commit 548927eb2e
3 changed files with 15 additions and 8 deletions

View File

@ -28,7 +28,7 @@ public class LibFreeRDP {
static {
final String[] libraries = {
"openh264", "crypto", "ssl", "jpeg", "winpr",
"openh264", "freerdp-openssl", "jpeg", "winpr",
"freerdp", "freerdp-client", "freerdp-android"};
final String LD_PATH = System.getProperty("java.library.path");

View File

@ -24,10 +24,10 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
if (UNIX)
if (UNIX AND NOT ANDROID)
find_package(PkgConfig QUIET)
pkg_check_modules(_OPENSSL QUIET openssl)
endif (UNIX)
endif (UNIX AND NOT ANDROID)
# http://www.slproweb.com/products/Win32OpenSSL.html
SET(_OPENSSL_ROOT_HINTS
@ -71,7 +71,15 @@ IF(WIN32)
endif()
ENDIF(WIN32)
IF(WIN32 AND NOT CYGWIN)
IF(ANDROID)
FIND_LIBRARY(OPENSSL_LIBRARIES
NAMES
"freerdp-openssl"
${_OPENSSL_ROOT_HINTS_AND_PATHS}
PATH_SUFFIXES
"lib"
)
ELSEIF(WIN32 AND NOT CYGWIN)
# MINGW should go here too
IF(MSVC)
# /MD and /MDd are the standard values - if someone wants to use
@ -230,7 +238,7 @@ ELSE(WIN32 AND NOT CYGWIN)
SET(OPENSSL_LIBRARIES ${OPENSSL_SSL_LIBRARY} ${OPENSSL_CRYPTO_LIBRARY})
ENDIF(WIN32 AND NOT CYGWIN)
ENDIF(ANDROID)
function(from_hex HEX DEC)
string(TOUPPER "${HEX}" HEX)

View File

@ -46,7 +46,7 @@ function build {
DST_DIR=$BUILD_DST/$DST_PREFIX
common_run cd $BUILD_SRC
common_run git clean -xdf
common_run ./Configure --config=$SCRIPT_PATH/openssl-mips64.conf --openssldir=$DST_DIR $CONFIG shared
common_run ./Configure --config=$SCRIPT_PATH/openssl-mips64.conf --openssldir=$DST_DIR $CONFIG no-shared
common_run make CALC_VERSIONS="SHLIB_COMPAT=; SHLIB_SOVER=" depend
common_run make CALC_VERSIONS="SHLIB_COMPAT=; SHLIB_SOVER=" build_libs
@ -55,8 +55,7 @@ function build {
common_run mkdir -p $DST_DIR
fi
common_run cp -L libssl.so $DST_DIR
common_run cp -L libcrypto.so $DST_DIR
common_run ${CROSS_COMPILE}gcc --sysroot=${CROSS_SYSROOT} -shared -o $DST_DIR/libfreerdp-openssl.so -Wl,-whole-archive libcrypto.a libssl.a -Wl,-no-whole-archive
common_run cd $BASE
}