From 1dcdc506f34bfa0d9adc6d07587a4a71dbda455b Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Mon, 22 Jul 2013 13:09:21 +0200 Subject: [PATCH] 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 Reviewed-by: BogDan Vatra --- mkspecs/android-g++/qmake.conf | 3 +-- qmake/generators/unix/unixmake2.cpp | 3 +++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/mkspecs/android-g++/qmake.conf b/mkspecs/android-g++/qmake.conf index bcdfe068977..0afea12e606 100644 --- a/mkspecs/android-g++/qmake.conf +++ b/mkspecs/android-g++/qmake.conf @@ -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= diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp index e4d33e2d4e2..cd6f441472b 100644 --- a/qmake/generators/unix/unixmake2.cpp +++ b/qmake/generators/unix/unixmake2.cpp @@ -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"); }