From d725239c3e09c2b740a093265f6a9675fd2f8524 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 15 Oct 2012 19:45:16 -0700 Subject: 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 --- mkspecs/features/qt_functions.prf | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'mkspecs/features/qt_functions.prf') 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) } -- cgit v1.2.3