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
my $moduleprifwd = "$qtbasedir/mkspecs/modules/$modulepriname";
open MODULE_PRI_FILE, ">$moduleprifwd";
print MODULE_PRI_FILE "QT_MODULE_BASE = $basedir\n";
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";
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";
# qt_<module>.pri forwarding file
QT_MODULE_INCLUDE_BASE = $$[QT_INSTALL_HEADERS]
QT_MODULE_LIB_BASE = $$[QT_INSTALL_LIBS]
# 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]
# variable, default
defineTest(qtPrepareTool) {
# 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) {
$$1 ~= s,[/\\\\],$$QMAKE_DIR_SEP,
contains(QMAKE_HOST.os, Windows):!contains($$1, .*\\.(exe|bat)$) {
exists($$eval($$1).bat) {
QT_CORE_PATCH_VERSION = $$QT_PATCH_VERSION
QT.core.name = QtCore
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
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
QT_DBUS_PATCH_VERSION = $$QT_PATCH_VERSION
QT.dbus.name = QtDBus
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
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
QT_NETWORK_PATCH_VERSION = $$QT_PATCH_VERSION
QT.network.name = QtNetwork
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
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
QT_OPENGL_PATCH_VERSION = $$QT_PATCH_VERSION
QT.opengl.name = QtOpenGL
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
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
QT_OPENVG_PATCH_VERSION = $$QT_PATCH_VERSION
QT.openvg.name = QtOpenVG
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
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
QT_SQL_PATCH_VERSION = $$QT_PATCH_VERSION
QT.sql.name = QtSql
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
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
QT_TEST_PATCH_VERSION = $$QT_PATCH_VERSION
QT.testlib.name = QtTest
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
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
QT_XML_PATCH_VERSION = $$QT_PATCH_VERSION
QT.xml.name = QtXml
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
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