diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2012-11-27 14:20:08 (GMT) |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-04-05 09:33:24 (GMT) |
commit | 99f0754e9af80d9e6c2f23e5c4e3c1fd44d2e1cf (patch) | |
tree | 2d468213b203d329e987f95339568473b380de4f | |
parent | d04fdcaa4b1a9cf3bd8bd06609f8dbb2cce5df10 (diff) | |
download | Qt-99f0754e9af80d9e6c2f23e5c4e3c1fd44d2e1cf.zip Qt-99f0754e9af80d9e6c2f23e5c4e3c1fd44d2e1cf.tar.gz Qt-99f0754e9af80d9e6c2f23e5c4e3c1fd44d2e1cf.tar.bz2 |
qmake: increase .pro-file compatibility between Qt 4 and 5
This patch makes qt.prf not warn about libraries in QT that are separate
modules in Qt 5, but exist as part of some larger library in Qt 4.
With this change, both Qt 4.8 and Qt 5 projects can use
QT += widgets concurrent
to continue compiling unchanged under either Qt version.
Change-Id: I6f7c6a913377d7b44263c8ed152b272aa7ed9aa2
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
-rw-r--r-- | mkspecs/features/qt.prf | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/mkspecs/features/qt.prf b/mkspecs/features/qt.prf index 06098a7..ad2c669 100644 --- a/mkspecs/features/qt.prf +++ b/mkspecs/features/qt.prf @@ -41,8 +41,16 @@ for(QTLIB, $$list($$TMPLIBS)) { contains(QT, $$QTLIB): QT_ORDERED += $$QTLIB } +# don't warn about Qt 5 modules that in Qt 4 were part of another module +# (this allows easier writing of .pro files that work with both Qt 4 and 5): +_QT5_MODULES_TO_IGNORE_ = \ + widgets \ + webkitwidgets \ + printsupport \ + concurrent + QT_UNKNOWN = $$QT -QT_UNKNOWN -= $$QT_ORDERED +QT_UNKNOWN -= $$QT_ORDERED $$_QT5_MODULES_TO_IGNORE_ QT = $$QT_ORDERED for(QTLIB, $$list($$QT_UNKNOWN)) { !contains(TMPLIBS, $$QTLIB):message("Warning: unknown QT: $$QTLIB") @@ -182,6 +190,7 @@ for(QTLIB, $$list($$lower($$unique(QT)))) { } else:isEqual(QTLIB, declarative):qlib = QtDeclarative else:isEqual(QTLIB, multimedia):qlib = QtMultimedia else:isEqual(QTLIB, meegographicssystemhelper):qlib = QtMeeGoGraphicsSystemHelper + else:contains(_QT5_MODULES_TO_IGNORE_, $$QTLIB):qlib = # ignore Qt 5 libraries else:message("Unknown QT: $$QTLIB"):qlib = !isEmpty(qlib) { target_qt:isEqual(TARGET, qlib) { @@ -214,6 +223,8 @@ mac { !isEmpty(QT_NAMESPACE_MAC_CRC):DEFINES *= QT_NAMESPACE_MAC_CRC=$$QT_NAMESPACE_MAC_CRC } +unset(_QT5_MODULES_TO_IGNORE_) + #SIMD defines: mmx:DEFINES += QT_HAVE_MMX 3dnow:DEFINES += QT_HAVE_3DNOW |