diff options
author | Adam Strzelecki <ono@java.pl> | 2014-08-06 18:53:05 +0200 |
---|---|---|
committer | Jake Petroules <jake.petroules@petroules.com> | 2014-09-08 22:19:33 +0200 |
commit | af155105a9f48e3e96a7f1961732c38ff12465f4 (patch) | |
tree | ed7be646e6985b63b9d7bdbfe461a725d78935c0 /qmake/generators | |
parent | 935186d76e055083eda75b91488c9affec1fd110 (diff) |
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 <jake.petroules@petroules.com>
Diffstat (limited to 'qmake/generators')
-rw-r--r-- | qmake/generators/unix/unixmake2.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
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); } |