diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf index 04737f5f42..65eec35bfc 100644 --- a/mkspecs/features/qt_functions.prf +++ b/mkspecs/features/qt_functions.prf @@ -76,6 +76,7 @@ defineTest(qtAddModule) { MODULE_INCLUDES = $$eval(QT.$${1}.includes) MODULE_LIBS = $$eval(QT.$${1}.libs) MODULE_CONFIG = $$eval(QT.$${1}.module_config) + MODULE_MAJOR_VERSION = $$eval(QT.$${1}.MAJOR_VERSION) CONFIG += $$eval(QT.$${1}.CONFIG) DEFINES += $$eval(QT.$${1}.DEFINES) @@ -119,6 +120,16 @@ defineTest(qtAddModule) { } } + win32 { + # Make sure we link against the version pulled from the module's .pri + 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 + export($$ver_var) + export($$dver_var) + } + isEmpty(LINKAGE) { # Make sure we can link to uninstalled libraries !isEqual(MODULE_LIBS, $$[QT_INSTALL_LIBS]) { diff --git a/mkspecs/features/qt_module_config.prf b/mkspecs/features/qt_module_config.prf index 3d861279b4..6104362c0b 100644 --- a/mkspecs/features/qt_module_config.prf +++ b/mkspecs/features/qt_module_config.prf @@ -33,19 +33,6 @@ for(include_path, MODULE_INCLUDES):LAST_MODULE_INCLUDE=$${include_path} HEADERS_PRI = $$LAST_MODULE_INCLUDE/headers.pri include($$HEADERS_PRI, "", true)|clear(HEADERS_PRI) -#version overriding -win32 { - #because libnetwork.pro could be qmake'd (qmade?) before libqcore.pro we - #need to override the version of libq* in all other libq*'s just to be - #sure the same version is used - VERSIONS_LIST = $$split(VERSION, ".") - QT_LIBS_OVERRIDE = $$member(VERSIONS_LIST, 0) - for(lib, $$list(qtcore qtgui qtnetwork qtxml qtopengl qtsql qt3support)) { - eval(QMAKE_$${upper($$lib)}_VERSION_OVERRIDE = $$QT_LIBS_OVERRIDE) - eval(QMAKE_$${upper($$lib)}D_VERSION_OVERRIDE = $$QT_LIBS_OVERRIDE) - } -} - #other DESTDIR = $$eval(QT.$${MODULE}.libs) win32:!wince*:DLLDESTDIR = $$[QT_INSTALL_PREFIX]/bin