don't create forwarding module pris for non-prefix builds

as everything is built inside the common build/install dir, there is
no point in the fwd pri stuff.
as a "side effect", this makes it more straight-forward to relocate
non-prefix builds, which is the default on windows.

Task-number: QTBUG-28827
Change-Id: I010246a9ad87cf74974dc168768b1a8625f73260
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
This commit is contained in:
Oswald Buddenhagen 2013-01-28 20:25:44 +01:00 committed by The Qt Project
parent 9e388bf692
commit 6654a05fca

View File

@ -10,7 +10,11 @@
#
load(qt_build_paths)
MODULE_PRI = $$MODULE_QMAKE_OUTDIR/mkspecs/modules-inst/qt_lib_$${MODULE}.pri
MODULE_FWD_PRI = $$MODULE_QMAKE_OUTDIR/mkspecs/modules/qt_lib_$${MODULE}.pri
prefix_build: \
MODULE_PRI = $$MODULE_QMAKE_OUTDIR/mkspecs/modules-inst/qt_lib_$${MODULE}.pri
else: \
MODULE_PRI = $$MODULE_FWD_PRI
!build_pass {
@ -64,8 +68,9 @@ MODULE_PRI = $$MODULE_QMAKE_OUTDIR/mkspecs/modules-inst/qt_lib_$${MODULE}.pri
"" \
"QT_CONFIG += $$MODULE" # this is obsolete, but some code still depends on it
write_file($$MODULE_PRI, MODULE_PRI_CONT)|error("Aborting.")
MODULE_PRI_FILES = $$MODULE_PRI
MODULE_FWD_PRI = $$MODULE_QMAKE_OUTDIR/mkspecs/modules/qt_lib_$${MODULE}.pri
prefix_build {
# -rpath-link is used by the linker to find depedencies of dynamic
# libraries which were NOT specified on the command line.
@ -123,13 +128,24 @@ MODULE_PRI = $$MODULE_QMAKE_OUTDIR/mkspecs/modules-inst/qt_lib_$${MODULE}.pri
"include($$MODULE_PRI)"
write_file($$MODULE_FWD_PRI, MODULE_FWD_PRI_CONT)|error("Aborting.")
touch($$MODULE_FWD_PRI, $$MODULE_PRI)
MODULE_PRI_FILES += $$MODULE_FWD_PRI
} else { # prefix_build
# This is needed for the direct include() below.
QT_MODULE_BIN_BASE = $$[QT_INSTALL_BINS]
QT_MODULE_INCLUDE_BASE = $$[QT_INSTALL_HEADERS]
QT_MODULE_IMPORT_BASE = $$[QT_INSTALL_IMPORTS]
QT_MODULE_QML_BASE = $$[QT_INSTALL_QML]
QT_MODULE_LIB_BASE = $$[QT_INSTALL_LIBS]
QT_MODULE_LIBEXEC_BASE = $$[QT_INSTALL_LIBEXECS]
QT_MODULE_PLUGIN_BASE = $$[QT_INSTALL_PLUGINS]
}
# Then, inject the new module into the current cache state
!contains(QMAKE_INTERNAL_INCLUDED_FILES, $$MODULE_PRI) { # before the actual include()!
added = $$MODULE_PRI $$MODULE_FWD_PRI
cache(QMAKE_INTERNAL_INCLUDED_FILES, add transient, added)
unset(added)
}
!contains(QMAKE_INTERNAL_INCLUDED_FILES, $$MODULE_PRI): \ # before the actual include()!
cache(QMAKE_INTERNAL_INCLUDED_FILES, add transient, MODULE_PRI_FILES)
include($$MODULE_FWD_PRI)
for(var, $$list(VERSION MAJOR_VERSION MINOR_VERSION PATCH_VERSION \
name depends private_depends module_config CONFIG DEFINES sources \