2011-04-27 10:05:43 +00:00
|
|
|
load(exclusive_builds)
|
|
|
|
### Qt 5: remove "uic" and "resources" - or add "qt"
|
2012-05-09 16:52:44 +00:00
|
|
|
CONFIG = lex yacc warn_on debug uic resources exceptions $$CONFIG
|
2010-11-25 01:56:41 +00:00
|
|
|
|
2011-07-16 12:13:16 +00:00
|
|
|
!build_pass:exists($$_PRO_FILE_PWD_/sync.profile) {
|
2010-11-25 01:56:41 +00:00
|
|
|
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
|
2011-06-10 19:26:51 +00:00
|
|
|
isEmpty(QTDIR) { # figure out QTDIR based on qmake binary
|
|
|
|
QMAKE_BASED_QTDIR = $$dirname(QMAKE_QMAKE)
|
|
|
|
QTDIR = $$dirname(QMAKE_BASED_QTDIR)
|
|
|
|
unset(QMAKE_BASED_QTDIR)
|
|
|
|
}
|
2010-11-25 01:56:41 +00:00
|
|
|
}
|
|
|
|
|
2011-06-10 19:26:51 +00:00
|
|
|
QTFWD = -module-fwd $$OUT_PWD/module-paths/modules -cache-module-fwd
|
2011-11-17 15:00:12 +00:00
|
|
|
!isEmpty(QTDIR):exists($$QTDIR/.qmake.cache) {
|
2011-06-10 19:26:51 +00:00
|
|
|
# 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
|
2011-11-17 15:00:12 +00:00
|
|
|
win32 {
|
|
|
|
CMP_QDIR = $$upper($$QTDIR)
|
2012-02-28 19:57:38 +00:00
|
|
|
CMP_INSTALL_PREFIX = $$upper($$[QT_HOST_PREFIX])
|
2011-11-17 15:00:12 +00:00
|
|
|
} else {
|
|
|
|
CMP_QDIR = $$QTDIR
|
2012-02-28 19:57:38 +00:00
|
|
|
CMP_INSTALL_PREFIX = $$[QT_HOST_PREFIX]
|
2011-06-10 19:26:51 +00:00
|
|
|
}
|
2011-11-17 15:00:12 +00:00
|
|
|
contains(CMP_QDIR, $$CMP_INSTALL_PREFIX):QTFWD = -qtdir $$QTDIR -module-fwd $$QTDIR/mkspecs/modules -developer-build
|
|
|
|
unset(CMP_QDIR)
|
|
|
|
unset(CMP_INSTALL_PREFIX)
|
2011-05-18 13:23:51 +00:00
|
|
|
}
|
2010-11-25 01:56:41 +00:00
|
|
|
|
2011-01-28 14:17:00 +00:00
|
|
|
qtPrepareTool(QMAKE_SYNCQT, syncqt)
|
2011-05-30 12:14:28 +00:00
|
|
|
|
2011-11-14 12:18:08 +00:00
|
|
|
isEmpty(QMAKE_SYNCQT_OUTDIR): QMAKE_SYNCQT_OUTDIR = $$OUT_PWD
|
|
|
|
MSG = $$quote($$QMAKE_SYNCQT $$QTFWD -generator $$MAKEFILE_GENERATOR -outdir $$QMAKE_SYNCQT_OUTDIR $$_PRO_FILE_PWD_)
|
2011-05-30 12:14:28 +00:00
|
|
|
!silent:message($$MSG)
|
|
|
|
system($$MSG) {
|
2011-05-25 05:55:53 +00:00
|
|
|
# success! Nothing to do
|
|
|
|
} else {
|
2011-05-30 12:14:28 +00:00
|
|
|
error("Failed to run: $$MSG")
|
2011-05-25 05:55:53 +00:00
|
|
|
}
|
2012-03-01 13:34:48 +00:00
|
|
|
|
2012-03-02 10:56:16 +00:00
|
|
|
unset(QTFWD)
|
|
|
|
unset(PRO_BASENAME)
|
2010-11-25 01:56:41 +00:00
|
|
|
}
|
2012-05-15 07:47:47 +00:00
|
|
|
|
|
|
|
# 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]
|