280f8829b6
This feature is only available to advanced qmake clients who have their own defaults_pre.prf, where QMAKE_SYNCQT_OUTDIR is set before loading Qt's own default_pre. This is useful to be able to put the sync.profile file in a different level in the source tree than where you want the output in the build tree. An alternate/complimenting solution would be to allow the output path to be overriden from within the sync.profile file. Change-Id: I3cdef82dbe492877507e269e18571456beeb2b7d Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
45 lines
1.7 KiB
Plaintext
45 lines
1.7 KiB
Plaintext
load(exclusive_builds)
|
|
### Qt 5: remove "uic" and "resources" - or add "qt"
|
|
CONFIG = lex yacc warn_on debug uic resources $$CONFIG
|
|
|
|
!build_pass:exists($$_PRO_FILE_PWD_/sync.profile) {
|
|
PRO_BASENAME = $$basename(_PRO_FILE_)
|
|
|
|
# Try to detect proper QTDIR path. We require QTDIR, as syncqt uses that to create qt_module.pri
|
|
# forwarding files. If we don't find QTDIR, we avoid creating the fwd files, since you then need
|
|
# to do a 'make install;' before you can use the module
|
|
# (ie. we don't use QT_INSTALL_DATA for fwd includes. This path needs a full copy)
|
|
isEmpty(QTDIR) {
|
|
QTDIR = $$(QTDIR)
|
|
isEmpty(QTDIR):QTDIR = $$QT_BUILD_TREE
|
|
isEmpty(QTDIR) { # figure out QTDIR based on qmake binary
|
|
QMAKE_BASED_QTDIR = $$dirname(QMAKE_QMAKE)
|
|
QTDIR = $$dirname(QMAKE_BASED_QTDIR)
|
|
unset(QMAKE_BASED_QTDIR)
|
|
}
|
|
}
|
|
|
|
QTFWD = -module-fwd $$OUT_PWD/module-paths/modules -cache-module-fwd
|
|
!isEmpty(QTDIR) {
|
|
# Only if QTDIR points to an actual build directory
|
|
# and this build directory is the install directory
|
|
# can we tell syncqt to do a -developer-build
|
|
exists($$QTDIR/.qmake.cache):contains(QTDIR, $$[QT_INSTALL_PREFIX]) {
|
|
QTFWD = -qtdir $$QTDIR -module-fwd $$QTDIR/mkspecs/modules -developer-build
|
|
}
|
|
}
|
|
|
|
qtPrepareTool(QMAKE_SYNCQT, syncqt)
|
|
|
|
isEmpty(QMAKE_SYNCQT_OUTDIR): QMAKE_SYNCQT_OUTDIR = $$OUT_PWD
|
|
MSG = $$quote($$QMAKE_SYNCQT $$QTFWD -generator $$MAKEFILE_GENERATOR -outdir $$QMAKE_SYNCQT_OUTDIR $$_PRO_FILE_PWD_)
|
|
!silent:message($$MSG)
|
|
system($$MSG) {
|
|
# success! Nothing to do
|
|
} else {
|
|
error("Failed to run: $$MSG")
|
|
}
|
|
unset(QTFWD)
|
|
unset(PRO_BASENAME)
|
|
}
|