centralize detection of prefix builds

this makes the use sites more expressive

Change-Id: Ib879de65d1cc26462fa61f5339e951f294515faf
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
This commit is contained in:
Oswald Buddenhagen 2013-01-28 20:25:33 +01:00 committed by The Qt Project
parent 8f61befb53
commit f75e897519
5 changed files with 9 additions and 6 deletions

View File

@ -25,7 +25,7 @@ qml1_target: \
else: \
instbase = $$[QT_INSTALL_QML]
exists($$[QT_HOST_PREFIX]/.qmake.cache) {
!prefix_build {
# These bizarre rules copy the files to the qtbase build directory
defineReplace(qmlModStripSrcDir) {

View File

@ -20,7 +20,10 @@
debug(1, "Not loading qmodule.pri twice")
}
!build_pass:!isEmpty(_QMAKE_SUPER_CACHE_):!exists($$[QT_HOST_DATA]/.qmake.cache) {
!exists($$[QT_HOST_DATA]/.qmake.cache): \
CONFIG += prefix_build
!build_pass:!isEmpty(_QMAKE_SUPER_CACHE_):prefix_build {
# When doing a -prefix build of top-level qt5/qt.pro, we need to announce
# this repo's module pris' location to the other repos.
isEmpty(MODULE_QMAKE_OUTDIR): MODULE_QMAKE_OUTDIR = $$shadowed($$dirname(_QMAKE_CONF_))

View File

@ -16,8 +16,8 @@ isEmpty(MODULE_BASE_DIR): MODULE_BASE_DIR = $$MODULE_PROFILE_DIR
isEmpty(MODULE_BASE_OUTDIR): MODULE_BASE_OUTDIR = $$shadowed($$MODULE_BASE_DIR)
isEmpty(MODULE_QMAKE_OUTDIR): MODULE_QMAKE_OUTDIR = $$MODULE_BASE_OUTDIR
QTDIR = $$[QT_HOST_PREFIX]
exists($$QTDIR/.qmake.cache) {
!prefix_build {
QTDIR = $$[QT_HOST_PREFIX]
# Permit modules to enforce being built outside QTDIR ...
!force_independent: MODULE_BASE_OUTDIR = $$QTDIR
# ... though this sort of breaks the idea.

View File

@ -112,7 +112,7 @@ INCLUDEPATH *= $$eval(QT.$${MODULE}.includes) $$eval(QT.$${MODULE}.private_inclu
#other
TEMPLATE = lib
DESTDIR = $$eval(QT.$${MODULE}.libs)
win32:!wince*:exists($$[QT_INSTALL_PREFIX]/.qmake.cache): DLLDESTDIR = $$eval(QT.$${MODULE}.bins)
win32:!wince*:!prefix_build: DLLDESTDIR = $$eval(QT.$${MODULE}.bins)
CONFIG += qmake_cache target_qt

View File

@ -31,7 +31,7 @@ load(qt_targets)
# If we are doing a prefix build, create a "module" pri which enables
# qtPrepareTool() to work with the non-installed build.
!build_pass:!exists($$[QT_INSTALL_PREFIX]/.qmake.cache) {
!build_pass:prefix_build {
isEmpty(MODULE):MODULE = $$TARGET