summaryrefslogtreecommitdiffstats
path: root/mkspecs/features/qt_functions.prf
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2012-10-15 19:45:16 -0700
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-11-10 09:20:26 +0100
commitd725239c3e09c2b740a093265f6a9675fd2f8524 (patch)
tree63afc1305ca7bf3882fe4ffbdba1aee15b8fd743 /mkspecs/features/qt_functions.prf
parent8e65b2556b39dd635e98d9ca37ba533b91bb63fb (diff)
Insert the Qt major version (5) in the library names
As discussed on the mailing list, insert the Qt major library version in the library name, so even the development files can be co-installed with Qt 4. Discussed-on: http://lists.qt-project.org/pipermail/development/2012-September/006545.html Discussed-on: http://lists.qt-project.org/pipermail/development/2012-September/006551.html Change-Id: If0be11ebf9454a9fb6d96cda161790dfd53c00f5 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Diffstat (limited to 'mkspecs/features/qt_functions.prf')
-rw-r--r--mkspecs/features/qt_functions.prf16
1 files changed, 13 insertions, 3 deletions
diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf
index e4d3b03dc8..6da2bb6f36 100644
--- a/mkspecs/features/qt_functions.prf
+++ b/mkspecs/features/qt_functions.prf
@@ -14,6 +14,11 @@ defineReplace(qtLibraryTarget) {
mac:!static:contains(QT_CONFIG, qt_framework) {
QMAKE_FRAMEWORK_BUNDLE_NAME = $$LIBRARY_NAME
export(QMAKE_FRAMEWORK_BUNDLE_NAME)
+ } else {
+ # insert the major version in the library name
+ # unless it's a framework build
+ MAJOR_VERSION = $$section(VERSION, ., 0, 0)
+ LIBRARY_NAME ~= s,^Qt,Qt$$MAJOR_VERSION,
}
unset(LIBRARY_SUFFIX)
contains(TEMPLATE, .*lib):LIBRARY_SUFFIX = $$qtPlatformTargetSuffix()
@@ -79,12 +84,17 @@ defineTest(qtAddModule) {
}
}
+ # Re-insert the major version in the library name (cf qtLibraryTarget above)
+ # unless it's a framework build
+ !mac|!contains(MODULE_CONFIG, lib_bundle): \
+ MODULE_NAME ~= s,^Qt,Qt$$MODULE_MAJOR_VERSION,
+
win32 {
- # Make sure we link against the version pulled from the module's .pri
+ # Make sure the version number isn't appended again to the lib name
ver_var = QMAKE_$${upper($$MODULE_NAME$$QT_LIBINFIX)}_VERSION_OVERRIDE
dver_var = QMAKE_$${upper($$MODULE_NAME$$QT_LIBINFIX)}D_VERSION_OVERRIDE
- $$ver_var = $$MODULE_MAJOR_VERSION
- $$dver_var = $$MODULE_MAJOR_VERSION
+ $$ver_var = 0
+ $$dver_var = 0
export($$ver_var)
export($$dver_var)
}