Make each module refer to its own bin/

Since modules cannot rely on QtCore having a build directory, nor
can they build the applications directly into $$[QT_INSTALL_BINS]
each module needs their own bin/. Add this path to each module's
pri file, so others can use their applications
This commit is contained in:
Marius Storm-Olsen 2011-01-06 12:52:17 -06:00 committed by axis
parent 3ec5d96657
commit 82bf3bd775
11 changed files with 16 additions and 3 deletions

View File

@ -1008,6 +1008,7 @@ foreach my $lib (@modules_to_sync) {
my $moduleprifwd = "$qtbasedir/mkspecs/modules/$modulepriname";
open MODULE_PRI_FILE, ">$moduleprifwd";
print MODULE_PRI_FILE "QT_MODULE_BASE = $basedir\n";
print MODULE_PRI_FILE "QT_MODULE_BIN_BASE = $out_basedir/bin\n";
print MODULE_PRI_FILE "QT_MODULE_INCLUDE_BASE = $out_basedir/include\n";
print MODULE_PRI_FILE "QT_MODULE_LIB_BASE = $out_basedir/lib\n";
print MODULE_PRI_FILE "include($modulepri)\n";

View File

@ -20,6 +20,7 @@ isEmpty(QMAKE_QT_CONFIG)|!exists($$QMAKE_QT_CONFIG) {
# qt_<module>.pri forwarding file
QT_MODULE_INCLUDE_BASE = $$[QT_INSTALL_HEADERS]
QT_MODULE_LIB_BASE = $$[QT_INSTALL_LIBS]
QT_MODULE_BIN_BASE = $$[QT_INSTALL_BINS]
include($$mod)
}
}

View File

@ -157,10 +157,13 @@ defineTest(qtAddModule) {
# variable, default
defineTest(qtPrepareTool) {
isEmpty($$1) {
!isEmpty(QT_BUILD_TREE):$$1 = $$QT_BUILD_TREE/bin/$$2
else:$$1 = $$[QT_INSTALL_BINS]/$$2
MODBASE = $$[QT_INSTALL_BINS]
!isEmpty(QT_BUILD_TREE):MODBASE = $$QT_BUILD_TREE/bin
count(ARGS, 2, greaterThan) {
isEmpty(QT.$${3}.bins):warning("No QT.$${3}.bins, module path ignored for qtPrepareTool($$1, $$2, $$3)")
else:MODBASE = $$eval(QT.$${3}.bins)
}
isEmpty($$1):$$1 = $$MODBASE/$$2
$$1 ~= s,[/\\\\],$$QMAKE_DIR_SEP,
contains(QMAKE_HOST.os, Windows):!contains($$1, .*\\.(exe|bat)$) {
exists($$eval($$1).bat) {

View File

@ -4,6 +4,7 @@ QT_CORE_MINOR_VERSION = $$QT_MINOR_VERSION
QT_CORE_PATCH_VERSION = $$QT_PATCH_VERSION
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/private
QT.core.sources = $$QT_MODULE_BASE/src/corelib

View File

@ -4,6 +4,7 @@ QT_DBUS_MINOR_VERSION = $$QT_MINOR_VERSION
QT_DBUS_PATCH_VERSION = $$QT_PATCH_VERSION
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/private
QT.dbus.sources = $$QT_MODULE_BASE/src/dbus

View File

@ -4,6 +4,7 @@ QT_NETWORK_MINOR_VERSION = $$QT_MINOR_VERSION
QT_NETWORK_PATCH_VERSION = $$QT_PATCH_VERSION
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/private
QT.network.sources = $$QT_MODULE_BASE/src/network

View File

@ -4,6 +4,7 @@ QT_OPENGL_MINOR_VERSION = $$QT_MINOR_VERSION
QT_OPENGL_PATCH_VERSION = $$QT_PATCH_VERSION
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/private
QT.opengl.sources = $$QT_MODULE_BASE/src/opengl

View File

@ -4,6 +4,7 @@ QT_OPENVG_MINOR_VERSION = $$QT_MINOR_VERSION
QT_OPENVG_PATCH_VERSION = $$QT_PATCH_VERSION
QT.openvg.name = QtOpenVG
QT.openvg.bins = $$QT_MODULE_BIN_BASE
QT.openvg.includes = $$QT_MODULE_INCLUDE_BASE/QtOpenVG
QT.openvg.private_includes = $$QT_MODULE_INCLUDE_BASE/QtOpenVG/private
QT.openvg.sources = $$QT_MODULE_BASE/src/openvg

View File

@ -4,6 +4,7 @@ QT_SQL_MINOR_VERSION = $$QT_MINOR_VERSION
QT_SQL_PATCH_VERSION = $$QT_PATCH_VERSION
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/private
QT.sql.sources = $$QT_MODULE_BASE/src/sql

View File

@ -4,6 +4,7 @@ QT_TEST_MINOR_VERSION = $$QT_MINOR_VERSION
QT_TEST_PATCH_VERSION = $$QT_PATCH_VERSION
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/private
QT.testlib.sources = $$QT_MODULE_BASE/src/testlib

View File

@ -4,6 +4,7 @@ QT_XML_MINOR_VERSION = $$QT_MINOR_VERSION
QT_XML_PATCH_VERSION = $$QT_PATCH_VERSION
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/private
QT.xml.sources = $$QT_MODULE_BASE/src/xml