summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2012-06-20 10:34:13 +0200
committerQt by Nokia <qt-info@nokia.com>2012-06-20 12:38:32 +0200
commit6d9c545d2b83305c3c30a0e917e6c3a474dfe66a (patch)
tree54a003c6db32c85f80c5fbb46dbf9322855966e6 /src
parent86f953a6d40666a3355e76b3ab2c8a2cf5452ec6 (diff)
parentb652bffea7a0a1bf209c21d9b73f509226f031bd (diff)
Merge "Merge branch 'buildsystem'" into refs/staging/master
Diffstat (limited to 'src')
-rw-r--r--src/concurrent/concurrent.pro13
-rw-r--r--src/corelib/corelib.pro35
-rw-r--r--src/corelib/global/qlibraryinfo.cpp65
-rw-r--r--src/corelib/global/qlibraryinfo.h3
-rw-r--r--src/dbus/dbus.pro19
-rw-r--r--src/gui/gui.pro13
-rw-r--r--src/modules/qt_concurrent.pri15
-rw-r--r--src/modules/qt_core.pri15
-rw-r--r--src/modules/qt_dbus.pri16
-rw-r--r--src/modules/qt_gui.pri15
-rw-r--r--src/modules/qt_network.pri15
-rw-r--r--src/modules/qt_opengl.pri16
-rw-r--r--src/modules/qt_platformsupport.pri16
-rw-r--r--src/modules/qt_printsupport.pri14
-rw-r--r--src/modules/qt_sql.pri15
-rw-r--r--src/modules/qt_testlib.pri16
-rw-r--r--src/modules/qt_widgets.pri15
-rw-r--r--src/modules/qt_xml.pri15
-rw-r--r--src/network/network.pro15
-rw-r--r--src/opengl/opengl.pro11
-rw-r--r--src/platformsupport/platformsupport.pro18
-rw-r--r--src/printsupport/dialogs/qprintdialog_unix.cpp3
-rw-r--r--src/printsupport/printsupport.pro12
-rw-r--r--src/qbase.pri1
-rw-r--r--src/qt_install.pri1
-rw-r--r--src/qt_targets.pri1
-rw-r--r--src/sql/sql.pro11
-rw-r--r--src/src.pro161
-rw-r--r--src/testlib/qtest_global.h2
-rw-r--r--src/testlib/testlib.pro10
-rw-r--r--src/tools/bootstrap/bootstrap.pri4
-rw-r--r--src/tools/bootstrap/bootstrap.pro5
-rw-r--r--src/tools/moc/moc.pro5
-rw-r--r--src/tools/qdbuscpp2xml/qdbuscpp2xml.pro9
-rw-r--r--src/tools/qdbusxml2cpp/qdbusxml2cpp.pro8
-rw-r--r--src/tools/qdoc/qdoc.pro5
-rw-r--r--src/tools/rcc/rcc.pro3
-rw-r--r--src/tools/tools.pro42
-rw-r--r--src/tools/uic/uic.pro3
-rw-r--r--src/widgets/widgets.pro24
-rw-r--r--src/winmain/winmain.pro48
-rw-r--r--src/xml/xml.pro12
42 files changed, 240 insertions, 505 deletions
diff --git a/src/concurrent/concurrent.pro b/src/concurrent/concurrent.pro
index b0809c8939..6b81950138 100644
--- a/src/concurrent/concurrent.pro
+++ b/src/concurrent/concurrent.pro
@@ -1,21 +1,14 @@
-load(qt_module)
+load(qt_build_config)
TARGET = QtConcurrent
-QPRO_PWD = $$PWD
QT = core-private
+CONFIG += exceptions
-CONFIG += module exceptions
-MODULE_PRI = ../modules/qt_concurrent.pri
-
-DEFINES += QT_BUILD_CONCURRENT_LIB QT_NO_USING_NAMESPACE
+DEFINES += QT_NO_USING_NAMESPACE
win32-msvc*|win32-icc:QMAKE_LFLAGS += /BASE:0x66000000
-unix|win32-g++*:QMAKE_PKGCONFIG_REQUIRES = QtCore
-
load(qt_module_config)
-HEADERS += $$QT_SOURCE_TREE/src/concurrent/qtconcurrentversion.h
-
PRECOMPILED_HEADER = ../corelib/global/qt_pch.h
SOURCES += \
diff --git a/src/corelib/corelib.pro b/src/corelib/corelib.pro
index 545a94fdee..673d34b548 100644
--- a/src/corelib/corelib.pro
+++ b/src/corelib/corelib.pro
@@ -1,21 +1,18 @@
-load(qt_module)
+load(qt_build_config)
TARGET = QtCore
-QPRO_PWD = $$PWD
QT =
+CONFIG += exceptions
-CONFIG += module exceptions
MODULE = core # not corelib, as per project file
-MODULE_PRI = ../modules/qt_core.pri
+MODULE_CONFIG = moc resources
-DEFINES += QT_BUILD_CORE_LIB QT_NO_USING_NAMESPACE
+DEFINES += QT_NO_USING_NAMESPACE
win32-msvc*|win32-icc:QMAKE_LFLAGS += /BASE:0x67000000
irix-cc*:QMAKE_CXXFLAGS += -no_prelink -ptused
load(qt_module_config)
-HEADERS += $$QT_SOURCE_TREE/src/corelib/qtcoreversion.h
-
QMAKE_DOCS = $$PWD/doc/qtcore.qdocconf
QMAKE_DOCS_INDEX = ../../doc
@@ -50,3 +47,27 @@ QMAKE_LIBS += $$QMAKE_LIBS_CORE
QMAKE_DYNAMIC_LIST_FILE = $$PWD/QtCore.dynlist
contains(DEFINES,QT_EVAL):include(eval.pri)
+
+load(moc)
+load(resources)
+
+moc_dir.name = moc_location
+moc_dir.variable = QMAKE_MOC
+
+rcc_dir.name = rcc_location
+rcc_dir.variable = QMAKE_RCC
+
+QMAKE_PKGCONFIG_VARIABLES += moc_dir rcc_dir
+
+# These are aliens, but Linguist installs no own module, and it fits here best.
+
+qtPrepareTool(QMAKE_LUPDATE, lupdate)
+qtPrepareTool(QMAKE_LRELEASE, lrelease)
+
+lupdate_dir.name = lupdate_location
+lupdate_dir.variable = QMAKE_LUPDATE
+
+lrelease_dir.name = lrelease_location
+lrelease_dir.variable = QMAKE_LRELEASE
+
+QMAKE_PKGCONFIG_VARIABLES += lupdate_dir lrelease_dir
diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp
index 801b4d94cd..1bd17ce9ff 100644
--- a/src/corelib/global/qlibraryinfo.cpp
+++ b/src/corelib/global/qlibraryinfo.cpp
@@ -70,6 +70,10 @@ struct QLibrarySettings
{
QLibrarySettings();
QScopedPointer<QSettings> settings;
+#ifdef QT_BUILD_QMAKE
+ bool haveEffectivePaths;
+ bool havePaths;
+#endif
};
Q_GLOBAL_STATIC(QLibrarySettings, qt_library_settings)
@@ -77,12 +81,21 @@ class QLibraryInfoPrivate
{
public:
static QSettings *findConfiguration();
+#ifndef QT_BUILD_QMAKE
static void cleanup()
{
QLibrarySettings *ls = qt_library_settings();
if (ls)
ls->settings.reset(0);
}
+#else
+ static bool haveGroup(QLibraryInfo::PathGroup group)
+ {
+ QLibrarySettings *ls = qt_library_settings();
+ return ls ? (group == QLibraryInfo::EffectivePaths
+ ? ls->haveEffectivePaths : ls->havePaths) : false;
+ }
+#endif
static QSettings *configuration()
{
QLibrarySettings *ls = qt_library_settings();
@@ -95,7 +108,25 @@ QLibrarySettings::QLibrarySettings()
{
#ifndef QT_BUILD_QMAKE
qAddPostRoutine(QLibraryInfoPrivate::cleanup);
+ bool haveEffectivePaths;
+ bool havePaths;
+#endif
+ if (settings) {
+ // This code needs to be in the regular library, as otherwise a qt.conf that
+ // works for qmake would break things for dynamically built Qt tools.
+ QStringList children = settings->childGroups();
+ haveEffectivePaths = children.contains(QLatin1String("EffectivePaths"));
+ // Backwards compat: an existing but empty file is claimed to contain the Paths section.
+ havePaths = !haveEffectivePaths || children.contains(QLatin1String("Paths"));
+#ifndef QT_BUILD_QMAKE
+ if (!havePaths)
+ settings.reset(0);
+#else
+ } else {
+ haveEffectivePaths = false;
+ havePaths = false;
#endif
+ }
}
QSettings *QLibraryInfoPrivate::findConfiguration()
@@ -244,11 +275,11 @@ QString
QLibraryInfo::location(LibraryLocation loc)
{
#ifdef QT_BUILD_QMAKE
- QString ret = rawLocation(loc);
+ QString ret = rawLocation(loc, FinalPaths);
// Automatically prepend the sysroot to target paths
if (loc < SysrootPath || loc > LastHostPath) {
- QString sysroot = rawLocation(SysrootPath);
+ QString sysroot = rawLocation(SysrootPath, FinalPaths);
if (!sysroot.isEmpty() && ret.length() > 2 && ret.at(1) == QLatin1Char(':')
&& (ret.at(2) == QLatin1Char('/') || ret.at(2) == QLatin1Char('\\')))
ret.replace(0, 2, sysroot); // Strip out the drive on Windows targets
@@ -260,13 +291,25 @@ QLibraryInfo::location(LibraryLocation loc)
}
QString
-QLibraryInfo::rawLocation(LibraryLocation loc)
+QLibraryInfo::rawLocation(LibraryLocation loc, PathGroup group)
{
#else
-# define rawLocation location
+# define rawLocation(loca, group) location(loca)
+# define group dummy
#endif
QString ret;
- if(!QLibraryInfoPrivate::configuration()) {
+#ifdef QT_BUILD_QMAKE
+ // Logic for choosing the right data source: if EffectivePaths are requested
+ // and qt.conf with that section is present, use it, otherwise fall back to
+ // FinalPaths. For FinalPaths, use qt.conf if present and contains not only
+ // [EffectivePaths], otherwise fall back to builtins.
+ if (!QLibraryInfoPrivate::haveGroup(group)
+ && (group == FinalPaths
+ || !(group = FinalPaths, QLibraryInfoPrivate::haveGroup(FinalPaths))))
+#else
+ if (!QLibraryInfoPrivate::configuration())
+#endif
+ {
const char *path = 0;
if (loc >= 0 && loc < sizeof(qt_configure_prefix_path_strs)/sizeof(qt_configure_prefix_path_strs[0]))
path = qt_configure_prefix_path_strs[loc] + 12;
@@ -291,7 +334,11 @@ QLibraryInfo::rawLocation(LibraryLocation loc)
if(!key.isNull()) {
QSettings *config = QLibraryInfoPrivate::configuration();
- config->beginGroup(QLatin1String("Paths"));
+ config->beginGroup(QLatin1String(
+#ifdef QT_BUILD_QMAKE
+ group == EffectivePaths ? "EffectivePaths" :
+#endif
+ "Paths"));
ret = config->value(key, defaultValue).toString();
@@ -312,6 +359,8 @@ QLibraryInfo::rawLocation(LibraryLocation loc)
}
config->endGroup();
+
+ ret = QDir::fromNativeSeparators(ret);
}
}
@@ -325,7 +374,7 @@ QLibraryInfo::rawLocation(LibraryLocation loc)
baseDir = QFileInfo(qmake_libraryInfoFile()).absolutePath();
} else if (loc > SysrootPath && loc <= LastHostPath) {
// We make any other host path absolute to the host prefix directory.
- baseDir = rawLocation(HostPrefixPath);
+ baseDir = rawLocation(HostPrefixPath, group);
#else
if (loc == PrefixPath) {
if (QCoreApplication::instance()) {
@@ -347,7 +396,7 @@ QLibraryInfo::rawLocation(LibraryLocation loc)
#endif
} else {
// we make any other path absolute to the prefix directory
- baseDir = rawLocation(PrefixPath);
+ baseDir = rawLocation(PrefixPath, group);
}
ret = QDir::cleanPath(baseDir + QLatin1Char('/') + ret);
}
diff --git a/src/corelib/global/qlibraryinfo.h b/src/corelib/global/qlibraryinfo.h
index 5666afbad8..5861b4b8bd 100644
--- a/src/corelib/global/qlibraryinfo.h
+++ b/src/corelib/global/qlibraryinfo.h
@@ -90,7 +90,8 @@ public:
};
static QString location(LibraryLocation); // ### Qt 6: consider renaming it to path()
#ifdef QT_BUILD_QMAKE
- static QString rawLocation(LibraryLocation);
+ enum PathGroup { FinalPaths, EffectivePaths };
+ static QString rawLocation(LibraryLocation, PathGroup);
#endif
private:
diff --git a/src/dbus/dbus.pro b/src/dbus/dbus.pro
index b1a3e12e1f..0360d654e6 100644
--- a/src/dbus/dbus.pro
+++ b/src/dbus/dbus.pro
@@ -1,14 +1,11 @@
-load(qt_module)
+load(qt_build_config)
TARGET = QtDBus
-QPRO_PWD = $$PWD
QT = core-private
+CONFIG += link_pkgconfig
+MODULE_CONFIG = dbusadaptors dbusinterfaces
-CONFIG += link_pkgconfig module
-MODULE_PRI = ../modules/qt_dbus.pri
-
-DEFINES += QT_BUILD_DBUS_LIB \
- DBUS_API_SUBJECT_TO_CHANGE
+DEFINES += DBUS_API_SUBJECT_TO_CHANGE
QMAKE_CXXFLAGS += $$QT_CFLAGS_DBUS
contains(QT_CONFIG, dbus-linked) {
LIBS_PRIVATE += $$QT_LIBS_DBUS
@@ -16,12 +13,6 @@ contains(QT_CONFIG, dbus-linked) {
}
# INCLUDEPATH += .
-unix|win32-g++* {
- QMAKE_PKGCONFIG_DESCRIPTION = Qt \
- DBus \
- module
- QMAKE_PKGCONFIG_REQUIRES = QtCore
-}
win32 {
wince*:LIBS_PRIVATE += -lws2
else:LIBS_PRIVATE += -lws2_32 \
@@ -33,8 +24,6 @@ win32 {
}
load(qt_module_config)
-HEADERS += $$QT_SOURCE_TREE/src/dbus/qtdbusversion.h
-
QMAKE_DOCS = $$PWD/doc/qtdbus.qdocconf
QMAKE_DOCS_INDEX = ../../doc
diff --git a/src/gui/gui.pro b/src/gui/gui.pro
index b1f4a106a4..50dc41b8aa 100644
--- a/src/gui/gui.pro
+++ b/src/gui/gui.pro
@@ -1,15 +1,10 @@
-load(qt_module)
+load(qt_build_config)
TARGET = QtGui
-QPRO_PWD = $$PWD
QT = core-private
+MODULE_CONFIG = opengl
-CONFIG += module
-MODULE_PRI = ../modules/qt_gui.pri
-
-DEFINES += QT_BUILD_GUI_LIB QT_NO_USING_NAMESPACE
-
-unix|win32-g++*:QMAKE_PKGCONFIG_REQUIRES = QtCore
+DEFINES += QT_NO_USING_NAMESPACE
load(qt_module_config)
@@ -21,8 +16,6 @@ testcocoon {
load(testcocoon)
}
-HEADERS += $$QT_SOURCE_TREE/src/gui/qtguiversion.h
-
QMAKE_DOCS = $$PWD/doc/qtgui.qdocconf
QMAKE_DOCS_INDEX = ../../doc
diff --git a/src/modules/qt_concurrent.pri b/src/modules/qt_concurrent.pri
deleted file mode 100644
index eccec12f66..0000000000
--- a/src/modules/qt_concurrent.pri
+++ /dev/null
@@ -1,15 +0,0 @@
-QT.concurrent.VERSION = 5.0.0
-QT.concurrent.MAJOR_VERSION = 5
-QT.concurrent.MINOR_VERSION = 0
-QT.concurrent.PATCH_VERSION = 0
-
-QT.concurrent.name = QtConcurrent
-QT.concurrent.bins = $$QT_MODULE_BIN_BASE
-QT.concurrent.includes = $$QT_MODULE_INCLUDE_BASE/QtConcurrent
-QT.concurrent.private_includes = $$QT_MODULE_INCLUDE_BASE/QtConcurrent/$$QT.concurrent.VERSION
-QT.concurrent.sources = $$QT_MODULE_BASE/src/concurrent
-QT.concurrent.libs = $$QT_MODULE_LIB_BASE
-QT.concurrent.plugins = $$QT_MODULE_PLUGIN_BASE
-QT.concurrent.imports = $$QT_MODULE_IMPORT_BASE
-QT.concurrent.depends = core
-QT.concurrent.DEFINES = QT_CONCURRENT_LIB
diff --git a/src/modules/qt_core.pri b/src/modules/qt_core.pri
deleted file mode 100644
index e6e5df9d27..0000000000
--- a/src/modules/qt_core.pri
+++ /dev/null
@@ -1,15 +0,0 @@
-QT.core.VERSION = 5.0.0
-QT.core.MAJOR_VERSION = 5
-QT.core.MINOR_VERSION = 0
-QT.core.PATCH_VERSION = 0
-
-QT.core.name = QtCore
-QT.core.bins = $$QT_MODULE_BIN_BASE
-QT.core.includes = $$QT_MODULE_INCLUDE_BASE/QtCore
-QT.core.private_includes = $$QT_MODULE_INCLUDE_BASE/QtCore/$$QT.core.VERSION
-QT.core.sources = $$QT_MODULE_BASE/src/corelib
-QT.core.libs = $$QT_MODULE_LIB_BASE
-QT.core.plugins = $$QT_MODULE_PLUGIN_BASE
-QT.core.imports = $$QT_MODULE_IMPORT_BASE
-QT.core.depends =
-QT.core.DEFINES = QT_CORE_LIB
diff --git a/src/modules/qt_dbus.pri b/src/modules/qt_dbus.pri
deleted file mode 100644
index 8514265f8c..0000000000
--- a/src/modules/qt_dbus.pri
+++ /dev/null
@@ -1,16 +0,0 @@
-QT.dbus.VERSION = 5.0.0
-QT.dbus.MAJOR_VERSION = 5
-QT.dbus.MINOR_VERSION = 0
-QT.dbus.PATCH_VERSION = 0
-
-QT.dbus.name = QtDBus
-QT.dbus.bins = $$QT_MODULE_BIN_BASE
-QT.dbus.includes = $$QT_MODULE_INCLUDE_BASE/QtDBus
-QT.dbus.private_includes = $$QT_MODULE_INCLUDE_BASE/QtDBus/$$QT.dbus.VERSION
-QT.dbus.sources = $$QT_MODULE_BASE/src/dbus
-QT.dbus.libs = $$QT_MODULE_LIB_BASE
-QT.dbus.plugins = $$QT_MODULE_PLUGIN_BASE
-QT.dbus.imports = $$QT_MODULE_IMPORT_BASE
-QT.dbus.depends = core
-QT.dbus.CONFIG = dbusadaptors dbusinterfaces
-QT.dbus.DEFINES = QT_DBUS_LIB
diff --git a/src/modules/qt_gui.pri b/src/modules/qt_gui.pri
deleted file mode 100644
index 2dfbb4a604..0000000000
--- a/src/modules/qt_gui.pri
+++ /dev/null
@@ -1,15 +0,0 @@
-QT.gui.VERSION = 5.0.0
-QT.gui.MAJOR_VERSION = 5
-QT.gui.MINOR_VERSION = 0
-QT.gui.PATCH_VERSION = 0
-
-QT.gui.name = QtGui
-QT.gui.includes = $$QT_MODULE_INCLUDE_BASE/QtGui
-QT.gui.private_includes = $$QT_MODULE_INCLUDE_BASE/QtGui/$$QT.gui.VERSION
-QT.gui.sources = $$QT_MODULE_BASE/src/gui
-QT.gui.libs = $$QT_MODULE_LIB_BASE
-QT.gui.plugins = $$QT_MODULE_PLUGIN_BASE
-QT.gui.imports = $$QT_MODULE_IMPORT_BASE
-QT.gui.depends = core
-QT.gui.CONFIG = opengl
-QT.gui.DEFINES = QT_GUI_LIB
diff --git a/src/modules/qt_network.pri b/src/modules/qt_network.pri
deleted file mode 100644
index 76b462286f..0000000000
--- a/src/modules/qt_network.pri
+++ /dev/null
@@ -1,15 +0,0 @@
-QT.network.VERSION = 5.0.0
-QT.network.MAJOR_VERSION = 5
-QT.network.MINOR_VERSION = 0
-QT.network.PATCH_VERSION = 0
-
-QT.network.name = QtNetwork
-QT.network.bins = $$QT_MODULE_BIN_BASE
-QT.network.includes = $$QT_MODULE_INCLUDE_BASE/QtNetwork
-QT.network.private_includes = $$QT_MODULE_INCLUDE_BASE/QtNetwork/$$QT.network.VERSION
-QT.network.sources = $$QT_MODULE_BASE/src/network
-QT.network.libs = $$QT_MODULE_LIB_BASE
-QT.network.plugins = $$QT_MODULE_PLUGIN_BASE
-QT.network.imports = $$QT_MODULE_IMPORT_BASE
-QT.network.depends = core
-QT.network.DEFINES = QT_NETWORK_LIB
diff --git a/src/modules/qt_opengl.pri b/src/modules/qt_opengl.pri
deleted file mode 100644
index 22476cf949..0000000000
--- a/src/modules/qt_opengl.pri
+++ /dev/null
@@ -1,16 +0,0 @@
-QT.opengl.VERSION = 5.0.0
-QT.opengl.MAJOR_VERSION = 5
-QT.opengl.MINOR_VERSION = 0
-QT.opengl.PATCH_VERSION = 0
-
-QT.opengl.name = QtOpenGL
-QT.opengl.bins = $$QT_MODULE_BIN_BASE
-QT.opengl.includes = $$QT_MODULE_INCLUDE_BASE/QtOpenGL
-QT.opengl.private_includes = $$QT_MODULE_INCLUDE_BASE/QtOpenGL/$$QT.opengl.VERSION
-QT.opengl.sources = $$QT_MODULE_BASE/src/opengl
-QT.opengl.libs = $$QT_MODULE_LIB_BASE
-QT.opengl.plugins = $$QT_MODULE_PLUGIN_BASE
-QT.opengl.imports = $$QT_MODULE_IMPORT_BASE
-QT.opengl.depends = core gui widgets
-QT.opengl.CONFIG = opengl
-QT.opengl.DEFINES = QT_OPENGL_LIB
diff --git a/src/modules/qt_platformsupport.pri b/src/modules/qt_platformsupport.pri
deleted file mode 100644
index 6671cc0584..0000000000
--- a/src/modules/qt_platformsupport.pri
+++ /dev/null
@@ -1,16 +0,0 @@
-QT.platformsupport.VERSION = 5.0.0
-QT.platformsupport.MAJOR_VERSION = 5
-QT.platformsupport.MINOR_VERSION = 0
-QT.platformsupport.PATCH_VERSION = 0
-
-QT.platformsupport.name = QtPlatformSupport
-QT.platformsupport.bins = $$QT_MODULE_BIN_BASE
-QT.platformsupport.includes = $$QT_MODULE_INCLUDE_BASE/QtPlatformSupport
-QT.platformsupport.private_includes = $$QT_MODULE_INCLUDE_BASE/QtPlatformSupport/$$QT.platformsupport.VERSION
-QT.platformsupport.sources = $$QT_MODULE_BASE/src/platformsupport
-QT.platformsupport.libs = $$QT_MODULE_LIB_BASE
-QT.platformsupport.plugins = $$QT_MODULE_PLUGIN_BASE
-QT.platformsupport.imports = $$QT_MODULE_IMPORT_BASE
-QT.platformsupport.depends = core gui
-QT.platformsupport.module_config = staticlib
-QT.platformsupport.DEFINES =
diff --git a/src/modules/qt_printsupport.pri b/src/modules/qt_printsupport.pri
deleted file mode 100644
index 85603296a6..0000000000
--- a/src/modules/qt_printsupport.pri
+++ /dev/null
@@ -1,14 +0,0 @@
-QT.printsupport.VERSION = 5.0.0
-QT.printsupport.MAJOR_VERSION = 5
-QT.printsupport.MINOR_VERSION = 0
-QT.printsupport.PATCH_VERSION = 0
-
-QT.printsupport.name = QtPrintSupport
-QT.printsupport.includes = $$QT_MODULE_INCLUDE_BASE/QtPrintSupport
-QT.printsupport.private_includes = $$QT_MODULE_INCLUDE_BASE/QtPrintSupport/$$QT.printsupport.VERSION
-QT.printsupport.sources = $$QT_MODULE_BASE/src/printsupport
-QT.printsupport.libs = $$QT_MODULE_LIB_BASE
-QT.printsupport.plugins = $$QT_MODULE_PLUGIN_BASE
-QT.printsupport.imports = $$QT_MODULE_IMPORT_BASE
-QT.printsupport.depends = core gui widgets
-QT.printsupport.DEFINES = QT_PRINTSUPPORT_LIB
diff --git a/src/modules/qt_sql.pri b/src/modules/qt_sql.pri
deleted file mode 100644
index 02f48d2a6b..0000000000
--- a/src/modules/qt_sql.pri
+++ /dev/null
@@ -1,15 +0,0 @@
-QT.sql.VERSION = 5.0.0
-QT.sql.MAJOR_VERSION = 5
-QT.sql.MINOR_VERSION = 0
-QT.sql.PATCH_VERSION = 0
-
-QT.sql.name = QtSql
-QT.sql.bins = $$QT_MODULE_BIN_BASE
-QT.sql.includes = $$QT_MODULE_INCLUDE_BASE/QtSql
-QT.sql.private_includes = $$QT_MODULE_INCLUDE_BASE/QtSql/$$QT.sql.VERSION
-QT.sql.sources = $$QT_MODULE_BASE/src/sql
-QT.sql.libs = $$QT_MODULE_LIB_BASE
-QT.sql.plugins = $$QT_MODULE_PLUGIN_BASE
-QT.sql.imports = $$QT_MODULE_IMPORT_BASE
-QT.sql.depends = core
-QT.sql.DEFINES = QT_SQL_LIB
diff --git a/src/modules/qt_testlib.pri b/src/modules/qt_testlib.pri
deleted file mode 100644
index 8f6a342a58..0000000000
--- a/src/modules/qt_testlib.pri
+++ /dev/null
@@ -1,16 +0,0 @@
-QT.testlib.VERSION = 5.0.0
-QT.testlib.MAJOR_VERSION = 5
-QT.testlib.MINOR_VERSION = 0
-QT.testlib.PATCH_VERSION = 0
-
-QT.testlib.name = QtTest
-QT.testlib.bins = $$QT_MODULE_BIN_BASE
-QT.testlib.includes = $$QT_MODULE_INCLUDE_BASE/QtTest
-QT.testlib.private_includes = $$QT_MODULE_INCLUDE_BASE/QtTest/$$QT.testlib.VERSION
-QT.testlib.sources = $$QT_MODULE_BASE/src/testlib
-QT.testlib.libs = $$QT_MODULE_LIB_BASE
-QT.testlib.plugins = $$QT_MODULE_PLUGIN_BASE
-QT.testlib.imports = $$QT_MODULE_IMPORT_BASE
-QT.testlib.depends = core
-QT.testlib.CONFIG = console
-QT.testlib.DEFINES = QT_TESTLIB_LIB QT_TESTCASE_BUILDDIR=\\\"$$OUT_PWD\\\"
diff --git a/src/modules/qt_widgets.pri b/src/modules/qt_widgets.pri
deleted file mode 100644
index 9e42fdae61..0000000000
--- a/src/modules/qt_widgets.pri
+++ /dev/null
@@ -1,15 +0,0 @@
-QT.widgets.VERSION = 5.0.0
-QT.widgets.MAJOR_VERSION = 5
-QT.widgets.MINOR_VERSION = 0
-QT.widgets.PATCH_VERSION = 0
-
-QT.widgets.name = QtWidgets
-QT.widgets.bins = $$QT_MODULE_BIN_BASE
-QT.widgets.includes = $$QT_MODULE_INCLUDE_BASE/QtWidgets
-QT.widgets.private_includes = $$QT_MODULE_INCLUDE_BASE/QtWidgets/$$QT.widgets.VERSION
-QT.widgets.sources = $$QT_MODULE_BASE/src/widgets
-QT.widgets.libs = $$QT_MODULE_LIB_BASE
-QT.widgets.plugins = $$QT_MODULE_PLUGIN_BASE
-QT.widgets.imports = $$QT_MODULE_IMPORT_BASE
-QT.widgets.depends = core gui
-QT.widgets.DEFINES = QT_WIDGETS_LIB
diff --git a/src/modules/qt_xml.pri b/src/modules/qt_xml.pri
deleted file mode 100644
index ea831236e6..0000000000
--- a/src/modules/qt_xml.pri
+++ /dev/null
@@ -1,15 +0,0 @@
-QT.xml.VERSION = 5.0.0
-QT.xml.MAJOR_VERSION = 5
-QT.xml.MINOR_VERSION = 0
-QT.xml.PATCH_VERSION = 0
-
-QT.xml.name = QtXml
-QT.xml.bins = $$QT_MODULE_BIN_BASE
-QT.xml.includes = $$QT_MODULE_INCLUDE_BASE/QtXml
-QT.xml.private_includes = $$QT_MODULE_INCLUDE_BASE/QtXml/$$QT.xml.VERSION
-QT.xml.sources = $$QT_MODULE_BASE/src/xml
-QT.xml.libs = $$QT_MODULE_LIB_BASE
-QT.xml.plugins = $$QT_MODULE_PLUGIN_BASE
-QT.xml.imports = $$QT_MODULE_IMPORT_BASE
-QT.xml.depends = core
-QT.xml.DEFINES = QT_XML_LIB
diff --git a/src/network/network.pro b/src/network/network.pro
index 3e1bc6d4e5..fc901da072 100644
--- a/src/network/network.pro
+++ b/src/network/network.pro
@@ -1,13 +1,9 @@
-load(qt_module)
+load(qt_build_config)
-# Qt network module
TARGET = QtNetwork
-QPRO_PWD = $$PWD
-
-CONFIG += module
-MODULE_PRI = ../modules/qt_network.pri
+QT = core-private
-DEFINES += QT_BUILD_NETWORK_LIB QT_NO_USING_NAMESPACE
+DEFINES += QT_NO_USING_NAMESPACE
#DEFINES += QLOCALSERVER_DEBUG QLOCALSOCKET_DEBUG
#DEFINES += QNETWORKDISKCACHE_DEBUG
#DEFINES += QSSLSOCKET_DEBUG
@@ -15,15 +11,10 @@ DEFINES += QT_BUILD_NETWORK_LIB QT_NO_USING_NAMESPACE
#DEFINES += QABSTRACTSOCKET_DEBUG QNATIVESOCKETENGINE_DEBUG
#DEFINES += QTCPSOCKETENGINE_DEBUG QTCPSOCKET_DEBUG QTCPSERVER_DEBUG QSSLSOCKET_DEBUG
#DEFINES += QUDPSOCKET_DEBUG QUDPSERVER_DEBUG
-QT = core-private
win32-msvc*|win32-icc:QMAKE_LFLAGS += /BASE:0x64000000
-unix|win32-g++*:QMAKE_PKGCONFIG_REQUIRES = QtCore
-
load(qt_module_config)
-HEADERS += $$QT_SOURCE_TREE/src/network/qtnetworkversion.h
-
QMAKE_DOCS = $$PWD/doc/qtnetwork.qdocconf
QMAKE_DOCS_INDEX = ../../doc
diff --git a/src/opengl/opengl.pro b/src/opengl/opengl.pro
index f1589694a8..1649651ce7 100644
--- a/src/opengl/opengl.pro
+++ b/src/opengl/opengl.pro
@@ -1,24 +1,15 @@
-load(qt_module)
+load(qt_build_config)
TARGET = QtOpenGL
-QPRO_PWD = $$PWD
QT = core-private gui-private widgets-private
-CONFIG += module
-MODULE_PRI = ../modules/qt_opengl.pri
-
-DEFINES += QT_BUILD_OPENGL_LIB
DEFINES += QT_NO_USING_NAMESPACE
win32-msvc*|win32-icc:QMAKE_LFLAGS += /BASE:0x63000000
solaris-cc*:QMAKE_CXXFLAGS_RELEASE -= -O2
irix-cc*:QMAKE_CXXFLAGS += -no_prelink -ptused
-unix|win32-g++*:QMAKE_PKGCONFIG_REQUIRES = QtCore QtGui
-
load(qt_module_config)
-HEADERS += $$QT_SOURCE_TREE/src/opengl/qtopenglversion.h
-
contains(QT_CONFIG, opengl):CONFIG += opengl
contains(QT_CONFIG, opengles1):CONFIG += opengles1
contains(QT_CONFIG, opengles2):CONFIG += opengles2
diff --git a/src/platformsupport/platformsupport.pro b/src/platformsupport/platformsupport.pro
index fba1096ab2..e8ea981d6d 100644
--- a/src/platformsupport/platformsupport.pro
+++ b/src/platformsupport/platformsupport.pro
@@ -1,26 +1,12 @@
-load(qt_module)
+load(qt_build_config)
TARGET = QtPlatformSupport
-QPRO_PWD = $$PWD
-QT += core-private gui-private
-TEMPLATE = lib
-DESTDIR = $$QT.gui.libs
+QT = core-private gui-private
-CONFIG += module
CONFIG += staticlib
mac:LIBS += -lz -framework CoreFoundation -framework Carbon
-MODULE_PRI = ../modules/qt_platformsupport.pri
-
-DEFINES += QT_BUILD_PLATFORMSUPPORT_LIB
-
load(qt_module_config)
-unix|win32-g++*:QMAKE_PKGCONFIG_REQUIRES = QtCore QtGui
-
-include(../qbase.pri)
-
-HEADERS += $$PWD/qtplatformsupportversion.h
-
DEFINES += QT_NO_CAST_FROM_ASCII
PRECOMPILED_HEADER = ../corelib/global/qt_pch.h
diff --git a/src/printsupport/dialogs/qprintdialog_unix.cpp b/src/printsupport/dialogs/qprintdialog_unix.cpp
index 206ef7380b..3b189e2cb5 100644
--- a/src/printsupport/dialogs/qprintdialog_unix.cpp
+++ b/src/printsupport/dialogs/qprintdialog_unix.cpp
@@ -1351,9 +1351,6 @@ QT_END_NAMESPACE
#include "moc_qprintdialog.cpp"
#include "qprintdialog_unix.moc"
-#ifndef Q_OS_MAC
-#include "qrc_qprintdialog.cpp"
-#endif
#endif // QT_NO_PRINTDIALOG
diff --git a/src/printsupport/printsupport.pro b/src/printsupport/printsupport.pro
index 9002ba3996..6dffbd83c8 100644
--- a/src/printsupport/printsupport.pro
+++ b/src/printsupport/printsupport.pro
@@ -1,20 +1,12 @@
-load(qt_module)
+load(qt_build_config)
TARGET = QtPrintSupport
-QPRO_PWD = $$PWD
QT = core-private gui-private widgets-private
-CONFIG += module
-MODULE_PRI = ../modules/qt_printsupport.pri
-
-DEFINES += QT_BUILD_PRINTSUPPORT_LIB QT_NO_USING_NAMESPACE
-
-unix|win32-g++*:QMAKE_PKGCONFIG_REQUIRES = QtCore QtGui
+DEFINES += QT_NO_USING_NAMESPACE
load(qt_module_config)
-HEADERS += $$QT_SOURCE_TREE/src/printsupport/qtprintsupportversion.h
-
QMAKE_DOCS = $$PWD/doc/qtprintsupport.qdocconf
QMAKE_DOCS_INDEX = ../../doc
diff --git a/src/qbase.pri b/src/qbase.pri
deleted file mode 100644
index 528dd1e17a..0000000000
--- a/src/qbase.pri
+++ /dev/null
@@ -1 +0,0 @@
-load(qt_module_config)
diff --git a/src/qt_install.pri b/src/qt_install.pri
deleted file mode 100644
index 8a9a7ab5ba..0000000000
--- a/src/qt_install.pri
+++ /dev/null
@@ -1 +0,0 @@
-load(qt_installs)
diff --git a/src/qt_targets.pri b/src/qt_targets.pri
deleted file mode 100644
index 900b50bde4..0000000000
--- a/src/qt_targets.pri
+++ /dev/null
@@ -1 +0,0 @@
-load(qt_targets)
diff --git a/src/sql/sql.pro b/src/sql/sql.pro
index c2345d92ef..319217013f 100644
--- a/src/sql/sql.pro
+++ b/src/sql/sql.pro
@@ -1,22 +1,13 @@
-load(qt_module)
+load(qt_build_config)
TARGET = QtSql
-QPRO_PWD = $$PWD
QT = core-private
-CONFIG += module
-MODULE_PRI = ../modules/qt_sql.pri
-
-DEFINES += QT_BUILD_SQL_LIB
DEFINES += QT_NO_USING_NAMESPACE
win32-msvc*|win32-icc:QMAKE_LFLAGS += /BASE:0x62000000
-unix|win32-g++*:QMAKE_PKGCONFIG_REQUIRES = QtCore
-
load(qt_module_config)
-HEADERS += $$QT_SOURCE_TREE/src/sql/qtsqlversion.h
-
DEFINES += QT_NO_CAST_FROM_ASCII
PRECOMPILED_HEADER = ../corelib/global/qt_pch.h
SQL_P = sql
diff --git a/src/src.pro b/src/src.pro
index e46dc2e68a..a474b795af 100644
--- a/src/src.pro
+++ b/src/src.pro
@@ -1,117 +1,92 @@
TEMPLATE = subdirs
-# this order is important
-unset(SRC_SUBDIRS)
-win32:SRC_SUBDIRS += src_winmain
-!wince*:include(tools/tools.pro)
-SRC_SUBDIRS += src_corelib
-SRC_SUBDIRS += src_network src_sql src_gui src_xml src_testlib src_platformsupport src_widgets
-!wince*:SRC_SUBDIRS += src_printsupport
-nacl: SRC_SUBDIRS -= src_network src_testlib
-contains(QT_CONFIG, dbus):SRC_SUBDIRS += src_dbus
-contains(QT_CONFIG, concurrent):SRC_SUBDIRS += src_concurrent
-
-contains(QT_CONFIG, no-gui): SRC_SUBDIRS -= src_gui
-
-contains(QT_CONFIG, opengl)|contains(QT_CONFIG, opengles1)|contains(QT_CONFIG, opengles2): SRC_SUBDIRS += src_opengl
-SRC_SUBDIRS += src_plugins
+src_tools.subdir = $$PWD/tools
+src_tools.target = sub-tools
src_winmain.subdir = $$PWD/winmain
src_winmain.target = sub-winmain
+src_winmain.depends = sub-corelib # just for the module .pri file
+
src_corelib.subdir = $$PWD/corelib
src_corelib.target = sub-corelib
+
src_xml.subdir = $$PWD/xml
src_xml.target = sub-xml
+src_xml.depends = src_corelib
+
src_dbus.subdir = $$PWD/dbus
src_dbus.target = sub-dbus
-src_gui.subdir = $$PWD/gui
-src_gui.target = sub-gui
+src_dbus.depends = src_corelib
+
+src_concurrent.subdir = $$PWD/concurrent
+src_concurrent.target = sub-concurrent
+src_concurrent.depends = src_corelib
+
src_sql.subdir = $$PWD/sql
src_sql.target = sub-sql
+src_sql.depends = src_corelib
+
src_network.subdir = $$PWD/network
src_network.target = sub-network
-src_opengl.subdir = $$PWD/opengl
-src_opengl.target = sub-opengl
-src_plugins.subdir = $$PWD/plugins
-src_plugins.target = sub-plugins
-src_widgets.subdir = $$PWD/widgets
-src_widgets.target = sub-widgets
-!wince*: {
- src_printsupport.subdir = $$PWD/printsupport
- src_printsupport.target = sub-printsupport
-}
+src_network.depends = src_corelib
+
src_testlib.subdir = $$PWD/testlib
src_testlib.target = sub-testlib
+src_testlib.depends = src_corelib # src_gui & src_widgets are not build-depends
+
+src_gui.subdir = $$PWD/gui
+src_gui.target = sub-gui
+src_gui.depends = src_corelib
+
src_platformsupport.subdir = $$PWD/platformsupport
src_platformsupport.target = sub-platformsupport
-src_concurrent.subdir = $$PWD/concurrent
-src_concurrent.target = sub-concurrent
+src_platformsupport.depends = src_corelib src_gui src_network
+src_widgets.subdir = $$PWD/widgets
+src_widgets.target = sub-widgets
+src_widgets.depends = src_corelib src_gui
-#CONFIG += ordered
-!wince*:!ordered {
- src_corelib.depends = src_tools_moc src_tools_rcc
- src_gui.depends = src_corelib
- src_printsupport.depends = src_corelib src_gui src_widgets
- src_platformsupport.depends = src_corelib src_gui src_network
- src_widgets.depends = src_corelib src_gui src_tools_uic
- src_xml.depends = src_corelib
- src_concurrent.depends = src_corelib
- src_dbus.depends = src_corelib
- src_network.depends = src_corelib
- src_opengl.depends = src_gui src_widgets
- src_sql.depends = src_corelib
- src_testlib.depends = src_corelib src_gui src_widgets
- src_plugins.depends = src_gui src_sql src_xml src_platformsupport
-}
+src_opengl.subdir = $$PWD/opengl
+src_opengl.target = sub-opengl
+src_opengl.depends = src_gui src_widgets
+
+src_printsupport.subdir = $$PWD/printsupport
+src_printsupport.target = sub-printsupport
+src_printsupport.depends = src_corelib src_gui src_widgets
-contains(QT_CONFIG, no-widgets): SRC_SUBDIRS -= src_opengl src_widgets src_printsupport
-
-# This creates a sub-src rule
-sub_src_target.CONFIG = recursive
-sub_src_target.recurse = $$TOOLS_SUBDIRS $$SRC_SUBDIRS
-sub_src_target.target = sub-src
-sub_src_target.recurse_target =
-QMAKE_EXTRA_TARGETS += sub_src_target
-
-# This gives us a top level debug/release
-for(subname, SRC_SUBDIRS) {
- subdir = $$subname
- !isEmpty($${subname}.subdir):subdir = $$eval($${subname}.subdir)
- subpro = $$subdir/$${basename(subdir)}.pro
- !exists($$subpro):next()
- subtarget = $$replace(subdir, [^A-Za-z0-9], _)
- reg_src = $$replace(QT_SOURCE_TREE, \\\\, \\\\)
- subdir = $$replace(subdir, $$reg_src, $$QT_BUILD_TREE)
- subdir = $$replace(subdir, /, $$QMAKE_DIR_SEP)
- subdir = $$replace(subdir, \\\\, $$QMAKE_DIR_SEP)
- include($$subpro, SUB)
- !isEqual(subname, src_tools_bootstrap):if(isEqual(SUB.TEMPLATE, lib) | isEqual(SUB.TEMPLATE, subdirs)):!separate_debug_info {
- #debug
- debug-$${subtarget}.depends = $${subdir}$${QMAKE_DIR_SEP}$(MAKEFILE) $$EXTRA_DEBUG_TARGETS
- debug-$${subtarget}.commands = (cd $$subdir && $(MAKE) -f $(MAKEFILE) debug)
- EXTRA_DEBUG_TARGETS += debug-$${subtarget}
- QMAKE_EXTRA_TARGETS += debug-$${subtarget}
- #release
- release-$${subtarget}.depends = $${subdir}$${QMAKE_DIR_SEP}$(MAKEFILE) $$EXTRA_RELEASE_TARGETS
- release-$${subtarget}.commands = (cd $$subdir && $(MAKE) -f $(MAKEFILE) release)
- EXTRA_RELEASE_TARGETS += release-$${subtarget}
- QMAKE_EXTRA_TARGETS += release-$${subtarget}
- } else { #do not have a real debug target/release
- #debug
- debug-$${subtarget}.depends = $${subdir}$${QMAKE_DIR_SEP}$(MAKEFILE) $$EXTRA_DEBUG_TARGETS
- debug-$${subtarget}.commands = (cd $$subdir && $(MAKE) -f $(MAKEFILE) first)
- EXTRA_DEBUG_TARGETS += debug-$${subtarget}
- QMAKE_EXTRA_TARGETS += debug-$${subtarget}
- #release
- release-$${subtarget}.depends = $${subdir}$${QMAKE_DIR_SEP}$(MAKEFILE) $$EXTRA_RELEASE_TARGETS
- release-$${subtarget}.commands = (cd $$subdir && $(MAKE) -f $(MAKEFILE) first)
- EXTRA_RELEASE_TARGETS += release-$${subtarget}
- QMAKE_EXTRA_TARGETS += release-$${subtarget}
- }
+src_plugins.subdir = $$PWD/plugins
+src_plugins.target = sub-plugins
+src_plugins.depends = src_sql src_xml src_network src_platformsupport
+
+# this order is important
+!wince* {
+ SUBDIRS += src_tools
+ src_corelib.depends += src_tools
+}
+SUBDIRS += src_corelib
+win32:SUBDIRS += src_winmain
+SUBDIRS += src_network src_sql src_xml src_testlib
+contains(QT_CONFIG, dbus) {
+ SUBDIRS += src_dbus
+ src_plugins.depends += src_dbus
+}
+contains(QT_CONFIG, concurrent):SUBDIRS += src_concurrent
+!contains(QT_CONFIG, no-gui) {
+ SUBDIRS += src_gui
+ src_plugins.depends += src_gui
+ !contains(QT_CONFIG, no-widgets) {
+ SUBDIRS += src_platformsupport src_widgets
+ src_plugins.depends += src_platformsupport src_widgets
+ contains(QT_CONFIG, opengl(es1|es2)?) {
+ SUBDIRS += src_opengl
+ src_plugins.depends += src_opengl
+ }
+ !wince* {
+ SUBDIRS += src_printsupport
+ src_plugins.depends += src_printsupport
+ }
+ }
}
-debug.depends = $$EXTRA_DEBUG_TARGETS
-release.depends = $$EXTRA_RELEASE_TARGETS
-QMAKE_EXTRA_TARGETS += debug release
+SUBDIRS += src_plugins
-SUBDIRS += $$SRC_SUBDIRS
+nacl: SUBDIRS -= src_network src_testlib
diff --git a/src/testlib/qtest_global.h b/src/testlib/qtest_global.h
index b567fe7c00..18d09ba162 100644
--- a/src/testlib/qtest_global.h
+++ b/src/testlib/qtest_global.h
@@ -52,7 +52,7 @@ QT_BEGIN_NAMESPACE
#if !defined(QT_SHARED) && !defined(QT_DLL)
# define Q_TESTLIB_EXPORT
#else
-# ifdef QTESTLIB_MAKEDLL
+# ifdef QT_BUILD_TESTLIB_LIB
# define Q_TESTLIB_EXPORT Q_DECL_EXPORT
# else
# define Q_TESTLIB_EXPORT Q_DECL_IMPORT
diff --git a/src/testlib/testlib.pro b/src/testlib/testlib.pro
index 1a76a3b556..f77a611e25 100644
--- a/src/testlib/testlib.pro
+++ b/src/testlib/testlib.pro
@@ -1,11 +1,10 @@
-load(qt_module)
+load(qt_build_config)
TARGET = QtTest
-QPRO_PWD = $$PWD
QT = core-private
+CONFIG += exceptions
-CONFIG += module exceptions
-MODULE_PRI = ../modules/qt_testlib.pri
+MODULE_CONFIG = console testlib_defines
INCLUDEPATH += .
unix:!embedded:QMAKE_PKGCONFIG_DESCRIPTION = Qt \
@@ -59,7 +58,6 @@ SOURCES = qtestcase.cpp \
qxunittestlogger.cpp
DEFINES *= QT_NO_CAST_TO_ASCII \
QT_NO_CAST_FROM_ASCII \
- QTESTLIB_MAKEDLL \
QT_NO_DATASTREAM
embedded:QMAKE_CXXFLAGS += -fno-rtti
wince*::LIBS += libcmt.lib \
@@ -83,8 +81,6 @@ mac {
load(qt_module_config)
-HEADERS += $$QT_SOURCE_TREE/src/testlib/qttestversion.h
-
QMAKE_TARGET_PRODUCT = QTestLib
QMAKE_TARGET_DESCRIPTION = Qt \
Unit \
diff --git a/src/tools/bootstrap/bootstrap.pri b/src/tools/bootstrap/bootstrap.pri
index f6f8eba82b..5ea10d0e46 100644
--- a/src/tools/bootstrap/bootstrap.pri
+++ b/src/tools/bootstrap/bootstrap.pri
@@ -27,8 +27,8 @@ win32:DEFINES += QT_NODLL
INCLUDEPATH += $$QT_BUILD_TREE/include \
$$QT_BUILD_TREE/include/QtCore \
- $$QT_BUILD_TREE/include/QtCore/$$QT.core.VERSION \
- $$QT_BUILD_TREE/include/QtCore/$$QT.core.VERSION/QtCore
+ $$QT_BUILD_TREE/include/QtCore/$$QT_VERSION \
+ $$QT_BUILD_TREE/include/QtCore/$$QT_VERSION/QtCore
DEPENDPATH += $$INCLUDEPATH \
$$QT_SOURCE_TREE/src/corelib/global \
$$QT_SOURCE_TREE/src/corelib/kernel \
diff --git a/src/tools/bootstrap/bootstrap.pro b/src/tools/bootstrap/bootstrap.pro
index 239f9e58b3..afb1448be2 100644
--- a/src/tools/bootstrap/bootstrap.pro
+++ b/src/tools/bootstrap/bootstrap.pro
@@ -1,3 +1,4 @@
+option(host_build)
TEMPLATE = lib
TARGET = bootstrap
CONFIG += staticlib
@@ -30,8 +31,8 @@ win32:DEFINES += QT_NODLL
INCLUDEPATH += $$QT_BUILD_TREE/include \
$$QT_BUILD_TREE/include/QtCore \
- $$QT_BUILD_TREE/include/QtCore/$$QT.core.VERSION \
- $$QT_BUILD_TREE/include/QtCore/$$QT.core.VERSION/QtCore
+ $$QT_BUILD_TREE/include/QtCore/$$QT_VERSION \
+ $$QT_BUILD_TREE/include/QtCore/$$QT_VERSION/QtCore
DEPENDPATH += $$INCLUDEPATH \
../../corelib/global \
diff --git a/src/tools/moc/moc.pro b/src/tools/moc/moc.pro
index 62d692844f..8b53578e23 100644
--- a/src/tools/moc/moc.pro
+++ b/src/tools/moc/moc.pro
@@ -1,10 +1,11 @@
+option(host_build)
TEMPLATE = app
TARGET = moc
DEFINES += QT_MOC QT_NO_CAST_FROM_BYTEARRAY QT_NO_COMPRESS
DESTDIR = ../../../bin
-INCLUDEPATH += . $$OUT_PWD/../../corelib/global
-DEPENDPATH += .
+INCLUDEPATH += $$OUT_PWD/../../corelib/global
+DEPENDPATH += $$OUT_PWD/../../corelib/global
LIBS =
OBJECTS_DIR = .
diff --git a/src/tools/qdbuscpp2xml/qdbuscpp2xml.pro b/src/tools/qdbuscpp2xml/qdbuscpp2xml.pro
index 33f7937c5b..6dc6699b9b 100644
--- a/src/tools/qdbuscpp2xml/qdbuscpp2xml.pro
+++ b/src/tools/qdbuscpp2xml/qdbuscpp2xml.pro
@@ -1,4 +1,4 @@
-
+option(host_build)
TEMPLATE = app
TARGET = qdbuscpp2xml
@@ -6,13 +6,10 @@ DESTDIR = ../../../bin
include(../moc/moc.pri)
-INCLUDEPATH += .
-DEPENDPATH += .
-
INCLUDEPATH += $$QT_BUILD_TREE/include \
$$QT_BUILD_TREE/include/QtDBus \
- $$QT_BUILD_TREE/include/QtDBus/$$QT.dbus.VERSION \
- $$QT_BUILD_TREE/include/QtDBus/$$QT.dbus.VERSION/QtDBus \
+ $$QT_BUILD_TREE/include/QtDBus/$$QT_VERSION \
+ $$QT_BUILD_TREE/include/QtDBus/$$QT_VERSION/QtDBus \
$$QT_SOURCE_TREE/src/dbus
QMAKE_CXXFLAGS += $$QT_CFLAGS_DBUS
diff --git a/src/tools/qdbusxml2cpp/qdbusxml2cpp.pro b/src/tools/qdbusxml2cpp/qdbusxml2cpp.pro
index 5c430fdfb1..aebdef50ad 100644
--- a/src/tools/qdbusxml2cpp/qdbusxml2cpp.pro
+++ b/src/tools/qdbusxml2cpp/qdbusxml2cpp.pro
@@ -1,17 +1,15 @@
+option(host_build)
TEMPLATE = app
TARGET = qdbusxml2cpp
DESTDIR = ../../../bin
-INCLUDEPATH += .
-DEPENDPATH += .
-
include(../bootstrap/bootstrap.pri)
INCLUDEPATH += $$QT_BUILD_TREE/include \
$$QT_BUILD_TREE/include/QtDBus \
- $$QT_BUILD_TREE/include/QtDBus/$$QT.dbus.VERSION \
- $$QT_BUILD_TREE/include/QtDBus/$$QT.dbus.VERSION/QtDBus \
+ $$QT_BUILD_TREE/include/QtDBus/$$QT_VERSION \
+ $$QT_BUILD_TREE/include/QtDBus/$$QT_VERSION/QtDBus \
$$QT_SOURCE_TREE/src/dbus
QMAKE_CXXFLAGS += $$QT_CFLAGS_DBUS
diff --git a/src/tools/qdoc/qdoc.pro b/src/tools/qdoc/qdoc.pro
index 348593d74a..9a4796cebe 100644
--- a/src/tools/qdoc/qdoc.pro
+++ b/src/tools/qdoc/qdoc.pro
@@ -1,3 +1,4 @@
+option(host_build)
TEMPLATE = app
TARGET = qdoc
@@ -11,8 +12,8 @@ DEFINES += QT_NO_TRANSLATION
INCLUDEPATH += $$QT_SOURCE_TREE/src/tools/qdoc \
$$QT_SOURCE_TREE/src/tools/qdoc/qmlparser \
$$QT_BUILD_TREE/include/QtXml \
- $$QT_BUILD_TREE/include/QtXml/$$QT.xml.VERSION \
- $$QT_BUILD_TREE/include/QtXml/$$QT.xml.VERSION/QtXml
+ $$QT_BUILD_TREE/include/QtXml/$$QT_VERSION \
+ $$QT_BUILD_TREE/include/QtXml/$$QT_VERSION/QtXml
DEPENDPATH += $$QT_SOURCE_TREE/src/tools/qdoc \
$$QT_SOURCE_TREE/src/tools/qdoc/qmlparser \
diff --git a/src/tools/rcc/rcc.pro b/src/tools/rcc/rcc.pro
index e87ef605b9..b224f98b61 100644
--- a/src/tools/rcc/rcc.pro
+++ b/src/tools/rcc/rcc.pro
@@ -1,10 +1,9 @@
+option(host_build)
TEMPLATE = app
TARGET = rcc
DESTDIR = ../../../bin
DEFINES += QT_RCC
-INCLUDEPATH += .
-DEPENDPATH += .
include(rcc.pri)
HEADERS += ../../corelib/kernel/qcorecmdlineargs_p.h
diff --git a/src/tools/tools.pro b/src/tools/tools.pro
index 8ad30a998d..bd8896259a 100644
--- a/src/tools/tools.pro
+++ b/src/tools/tools.pro
@@ -33,44 +33,4 @@ contains(QT_CONFIG, dbus) {
}
}
-# Special handling, depending on type of project, if it used debug/release or only has one configuration
-EXTRA_DEBUG_TARGETS =
-EXTRA_RELEASE_TARGETS =
-for(subname, TOOLS_SUBDIRS) {
- subdir = $$subname
- !isEmpty($${subname}.subdir):subdir = $$eval($${subname}.subdir)
- subpro = $$subdir/$${basename(subdir)}.pro
- !exists($$subpro):next()
- subtarget = $$replace(subdir, [^A-Za-z0-9], _)
- reg_src = $$replace(QT_SOURCE_TREE, \\\\, \\\\)
- subdir = $$replace(subdir, $$reg_src, $$QT_BUILD_TREE)
- subdir = $$replace(subdir, /, $$QMAKE_DIR_SEP)
- subdir = $$replace(subdir, \\\\, $$QMAKE_DIR_SEP)
- include($$subpro, SUB)
- !isEqual(subname, src_tools_bootstrap):if(isEqual(SUB.TEMPLATE, lib) | isEqual(SUB.TEMPLATE, subdirs)):!separate_debug_info {
- #debug
- debug-$${subtarget}.depends = $${subdir}$${QMAKE_DIR_SEP}$(MAKEFILE) $$EXTRA_DEBUG_TARGETS
- debug-$${subtarget}.commands = (cd $$subdir && $(MAKE) -f $(MAKEFILE) debug)
- EXTRA_DEBUG_TARGETS += debug-$${subtarget}
- QMAKE_EXTRA_TARGETS += debug-$${subtarget}
- #release
- release-$${subtarget}.depends = $${subdir}$${QMAKE_DIR_SEP}$(MAKEFILE) $$EXTRA_RELEASE_TARGETS
- release-$${subtarget}.commands = (cd $$subdir && $(MAKE) -f $(MAKEFILE) release)
- EXTRA_RELEASE_TARGETS += release-$${subtarget}
- QMAKE_EXTRA_TARGETS += release-$${subtarget}
- } else { #do not have a real debug target/release
- #debug
- debug-$${subtarget}.depends = $${subdir}$${QMAKE_DIR_SEP}$(MAKEFILE) $$EXTRA_DEBUG_TARGETS
- debug-$${subtarget}.commands = (cd $$subdir && $(MAKE) -f $(MAKEFILE) first)
- EXTRA_DEBUG_TARGETS += debug-$${subtarget}
- QMAKE_EXTRA_TARGETS += debug-$${subtarget}
- #release
- release-$${subtarget}.depends = $${subdir}$${QMAKE_DIR_SEP}$(MAKEFILE) $$EXTRA_RELEASE_TARGETS
- release-$${subtarget}.commands = (cd $$subdir && $(MAKE) -f $(MAKEFILE) first)
- EXTRA_RELEASE_TARGETS += release-$${subtarget}
- QMAKE_EXTRA_TARGETS += release-$${subtarget}
- }
-}
-
-SUBDIRS = $$TOOLS_SUBDIRS $$SUBDIRS
-isEqual(TARGET,tools): SUBDIRS += $$SRC_SUBDIRS
+SUBDIRS = $$TOOLS_SUBDIRS
diff --git a/src/tools/uic/uic.pro b/src/tools/uic/uic.pro
index 0acc6e77c8..c4b7ca2e19 100644
--- a/src/tools/uic/uic.pro
+++ b/src/tools/uic/uic.pro
@@ -1,10 +1,9 @@
+option(host_build)
TEMPLATE = app
TARGET = uic
DESTDIR = ../../../bin
DEFINES += QT_UIC
-INCLUDEPATH += .
-DEPENDPATH += .
include(uic.pri)
include(cpp/cpp.pri)
diff --git a/src/widgets/widgets.pro b/src/widgets/widgets.pro
index 91ac4074e9..94ae7824a3 100644
--- a/src/widgets/widgets.pro
+++ b/src/widgets/widgets.pro
@@ -1,24 +1,17 @@
-load(qt_module)
+load(qt_build_config)
TARGET = QtWidgets
-QPRO_PWD = $$PWD
-QT = core core-private gui gui-private platformsupport-private
+QT = core-private gui-private
+MODULE_CONFIG = uic
-CONFIG += module
-MODULE_PRI = ../modules/qt_widgets.pri
-
-DEFINES += QT_BUILD_WIDGETS_LIB QT_NO_USING_NAMESPACE
+DEFINES += QT_NO_USING_NAMESPACE
win32-msvc*|win32-icc:QMAKE_LFLAGS += /BASE:0x65000000
irix-cc*:QMAKE_CXXFLAGS += -no_prelink -ptused
-unix|win32-g++*:QMAKE_PKGCONFIG_REQUIRES = QtCore
-
-HEADERS += $$QT_SOURCE_TREE/src/widgets/qtwidgetsversion.h
-
QMAKE_DOCS = $$PWD/doc/qtwidgets.qdocconf
QMAKE_DOCS_INDEX = ../../doc
-include(../qbase.pri)
+load(qt_module_config)
#platforms
mac:include(kernel/mac.pri)
@@ -56,3 +49,10 @@ INCLUDEPATH += ../3rdparty/harfbuzz/src
win32:!contains(QT_CONFIG, directwrite) {
DEFINES += QT_NO_DIRECTWRITE
}
+
+load(uic)
+
+uic_dir.name = uic_location
+uic_dir.variable = QMAKE_UIC
+
+QMAKE_PKGCONFIG_VARIABLES += uic_dir
diff --git a/src/winmain/winmain.pro b/src/winmain/winmain.pro
index 1d2c097c20..e5aa8c49e2 100644
--- a/src/winmain/winmain.pro
+++ b/src/winmain/winmain.pro
@@ -1,24 +1,32 @@
-# Additional Qt project file for qtmain lib on Windows
-TEMPLATE = lib
-TARGET = qtmain
-QT =
-
-CONFIG += staticlib warn_on
-CONFIG -= qt shared
-
-win32 {
- win32-msvc*:QMAKE_CFLAGS_DEBUG -= -Zi
- win32-msvc*:QMAKE_CXXFLAGS_DEBUG -= -Zi
- win32-msvc*:QMAKE_CFLAGS_DEBUG *= -Z7
- win32-msvc*:QMAKE_CXXFLAGS_DEBUG *= -Z7
- win32-g++*:DEFINES += QT_NEEDS_QMAIN
- win32-borland:DEFINES += QT_NEEDS_QMAIN
- SOURCES = qtmain_win.cpp
- CONFIG += png
- INCLUDEPATH += tmp $$QT.core.includes
-}
+load(qt_build_config)
+# Additional Qt project file for qtmain lib on Windows
!win32:error("$$_FILE_ is intended only for Windows!")
-load(qt_module_config)
+
+TEMPLATE = lib
+TARGET = qtmain
DESTDIR = $$QT.core.libs
+
+CONFIG += static warn_on depend_includepath
+CONFIG -= fix_output_dirs
+QT = # qt.prf is still needed for some DEFINES, etc.
+
+contains(QT_CONFIG, build_all):CONFIG += build_all
+
+win32-msvc*:QMAKE_CFLAGS_DEBUG -= -Zi
+win32-msvc*:QMAKE_CXXFLAGS_DEBUG -= -Zi
+win32-msvc*:QMAKE_CFLAGS_DEBUG *= -Z7
+win32-msvc*:QMAKE_CXXFLAGS_DEBUG *= -Z7
+win32-g++*|win32-borland:DEFINES += QT_NEEDS_QMAIN
+
+INCLUDEPATH += $$QT.core.includes
+
+SOURCES = qtmain_win.cpp
+
+load(qt_installs)
+
+TARGET = $$qtLibraryTarget($$TARGET$$QT_LIBINFIX) #do this towards the end
+
+load(qt_targets)
+
wince*:QMAKE_POST_LINK =
diff --git a/src/xml/xml.pro b/src/xml/xml.pro
index 2fff0218e4..5f4d844ea5 100644
--- a/src/xml/xml.pro
+++ b/src/xml/xml.pro
@@ -1,21 +1,13 @@
-load(qt_module)
+load(qt_build_config)
TARGET = QtXml
-QPRO_PWD = $$PWD
QT = core-private
-CONFIG += module
-MODULE_PRI = ../modules/qt_xml.pri
-
-DEFINES += QT_BUILD_XML_LIB QT_NO_USING_NAMESPACE
+DEFINES += QT_NO_USING_NAMESPACE
win32-msvc*|win32-icc:QMAKE_LFLAGS += /BASE:0x61000000
-unix|win32-g++*:QMAKE_PKGCONFIG_REQUIRES = QtCore
-
load(qt_module_config)
-HEADERS += $$QT_SOURCE_TREE/src/xml/qtxmlversion.h
-
QMAKE_DOCS = $$PWD/doc/qtxml.qdocconf
QMAKE_DOCS_INDEX = ../../doc