qt5base-lts/mkspecs/features/default_pre.prf
Oswald Buddenhagen a56ef02b2d let default_pre add modules to the qmake path
that way qmake is made aware of the forwarding pris which are generated
for this module even when a top-level .qmake.cache prevents the module's
root from being found automatically.
the path is also added to the cache, so that subsequent partial
qmake-ing of the tree will still find the module.

this also makes the -cache-module-fwd parameter of syncqt useless, so
remove it.

Change-Id: I2afbc52a465c0b3260e9bcaf032c43a82ae8061f
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:46:03 +02:00

39 lines
1.5 KiB
Plaintext

load(exclusive_builds)
CONFIG = lex yacc warn_on debug exceptions $$CONFIG
!build_pass:exists($$_PRO_FILE_PWD_/sync.profile) {
# If the install directory is a build directory, we tell syncqt to do a -developer-build.
QTDIR = $$[QT_HOST_DATA]
exists($$QTDIR/.qmake.cache) {
QTFWD = -module-fwd $$QTDIR/mkspecs/modules -developer-build
} else {
isEmpty(MODULE_QMAKE_OUTDIR): MODULE_QMAKE_OUTDIR = $$OUT_PWD
modpath = $$MODULE_QMAKE_OUTDIR/mkspecs/modules
QTFWD = -module-fwd $$modpath
!isEmpty(_QMAKE_SUPER_CACHE_):!contains(QMAKEMODULES, $$modpath): \
cache(QMAKEMODULES, add super, modpath)
unset(modpath)
}
qtPrepareTool(QMAKE_SYNCQT, syncqt)
isEmpty(MODULE_BASE_OUTDIR): MODULE_BASE_OUTDIR = $$OUT_PWD
MSG = $$quote($$QMAKE_SYNCQT -qtdir $$[QT_HOST_DATA/get] $$QTFWD -outdir $$MODULE_BASE_OUTDIR $$_PRO_FILE_PWD_)
!silent:message($$MSG)
system($$MSG) {
# success! Nothing to do
} else {
error("Failed to run: $$MSG")
}
# Do configure tests now. Fatal tests have a non zero return.
system("perl $$[QT_HOST_BINS/get]/qtmodule-configtests $$_PRO_FILE_PWD_ $$OUT_PWD $$[QT_HOST_PREFIX/get] $$MAKEFILE_GENERATOR")|error("Aborting.")
unset(QTFWD)
}
# Populate the installdir which will be passed to qdoc in the default_post.prf
# This allows a project to remove the installdir if need be, to trigger building online docs,
# which Qt Creator does.
QMAKE_DOCS_INSTALLDIR = $$[QT_INSTALL_DOCS]