From af155105a9f48e3e96a7f1961732c38ff12465f4 Mon Sep 17 00:00:00 2001 From: Adam Strzelecki Date: Wed, 6 Aug 2014 18:53:05 +0200 Subject: qmake: Add QMAKE_SONAME_PREFIX variable If defined, the value of this variable is prepended to the built shared library's SONAME identifier. For more information, see: qmake/doc/src/qmake-manual.qdoc#qmake-soname-prefix Task-number: QTBUG-31814 Change-Id: I4bceaf0c93162e4fad6bb424af1b82e74d38acdc Reviewed-by: Jake Petroules --- qmake/generators/unix/unixmake2.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'qmake/generators/unix') diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp index e16e0f5c20..c68cebfd8c 100644 --- a/qmake/generators/unix/unixmake2.cpp +++ b/qmake/generators/unix/unixmake2.cpp @@ -1265,6 +1265,13 @@ void UnixMakefileGenerator::init2() if(!instpath.endsWith(Option::dir_sep)) instpath += Option::dir_sep; soname.prepend(instpath); + } else if (!project->isEmpty("QMAKE_SONAME_PREFIX")) { + QString sonameprefix = project->first("QMAKE_SONAME_PREFIX").toQString(); + if (!sonameprefix.startsWith('@') && !sonameprefix.startsWith('$')) + sonameprefix = Option::fixPathToTargetOS(sonameprefix, false); + if (!sonameprefix.endsWith(Option::dir_sep)) + sonameprefix += Option::dir_sep; + soname.prepend(sonameprefix); } project->values("QMAKE_LFLAGS_SONAME").first() += escapeFilePath(soname); } -- cgit v1.2.3