Fix SONAME handling on android

Set the SONAME to the library name without the major
version number appended, as android does not have the versioned
symlinks.

Change-Id: I41c504869019a393a3f112b2f7fc81c7ad5afa1c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: BogDan Vatra <bogdan@kde.org>
This commit is contained in:
Stephen Kelly 2013-07-22 13:09:21 +02:00 committed by The Qt Project
parent 3c2c9649eb
commit 1dcdc506f3
2 changed files with 4 additions and 2 deletions

View File

@ -3,7 +3,7 @@ MAKEFILE_GENERATOR = UNIX
QMAKE_PLATFORM = android
QMAKE_COMPILER = gcc
CONFIG += android_install
CONFIG += android_install unversioned_soname
DEFINES += QT_NO_PRINTER QT_NO_PRINTDIALOG
include(../common/linux.conf)
@ -177,7 +177,6 @@ contains(NDK_ROOT, ".*r6")|contains(NDK_ROOT, ".*r5.*") {
}
QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB
QMAKE_LFLAGS_SONAME =
QMAKE_LFLAGS_NOUNDEF = -Wl,--no-undefined
QMAKE_LFLAGS_RPATH = -Wl,-rpath=
QMAKE_LFLAGS_RPATHLINK = -Wl,-rpath-link=

View File

@ -1178,6 +1178,9 @@ void UnixMakefileGenerator::init2()
soname += project->first("TARGET");
} else if(!project->isEmpty("QMAKE_BUNDLE")) {
soname += project->first("TARGET_x.y");
} else if(project->isActiveConfig("unversioned_soname")) {
soname = "lib" + project->first("QMAKE_ORIG_TARGET")
+ "." + project->first("QMAKE_EXTENSION_SHLIB");
} else if(!project->values("TARGET_x").isEmpty()) {
soname += project->first("TARGET_x");
}