0056cc0ced
If the user has set QTDIR to something other than the location of the qtbase build directory, syncqt will fail. This change prevents the build from continuing. Ideally, the system should ignore the user-set QTDIR value or give an appropriate error. Reviewed-by: Rohan McGovern
37 lines
1.4 KiB
Plaintext
37 lines
1.4 KiB
Plaintext
load(exclusive_builds)
|
|
### Qt 5: remove "uic" and "resources" - or add "qt"
|
|
CONFIG = lex yacc warn_on debug uic resources $$CONFIG
|
|
|
|
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):QTDIR = $$dirname(_QMAKE_CACHE_)
|
|
isEmpty(QTDIR) {
|
|
QMAKE_BASED_QTDIR = $$dirname(QMAKE_QMAKE)
|
|
QMAKE_BASED_QTDIR = $$dirname(QMAKE_BASED_QTDIR)
|
|
exists($$QMAKE_BASED_QTDIR/mkspecs/qconfig.pri): QTDIR = $$QMAKE_BASED_QTDIR
|
|
unset(QMAKE_BASED_QTDIR)
|
|
}
|
|
}
|
|
|
|
isEmpty(QTDIR):QTFWD="-no-module-fwd"
|
|
else:QTFWD="-qtdir $$QTDIR"
|
|
|
|
message("Running syncqt for $$PRO_BASENAME in $$OUT_PWD")
|
|
qtPrepareTool(QMAKE_SYNCQT, syncqt)
|
|
system("$$QMAKE_SYNCQT $$QTFWD -outdir $$OUT_PWD $$_PRO_FILE_PWD_") {
|
|
# success! Nothing to do
|
|
} else {
|
|
error("Failed to run: $$QMAKE_SYNCQT $$QTFWD -outdir $$OUT_PWD $$_PRO_FILE_PWD_")
|
|
}
|
|
unset(QTFWD)
|
|
unset(PRO_BASENAME)
|
|
}
|