qmlimportscanner: Ensure the correct variant is run

qmlimportscanner is run as a $$system command (as opposed
to as a makefile command) so specify it as such to
qtPrepareTool and run it as such too.

The distinction is important for MinGW-w64 static
builds where it must be run via cmd.exe and not sh.exe.

Change-Id: I0832d5138bff7f4fa1968646df28d2367ad062c2
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
This commit is contained in:
Ray Donnelly 2014-03-10 23:31:16 +00:00 committed by The Qt Project
parent 9891c5051f
commit da77aaa98c

View File

@ -80,7 +80,7 @@ qt_module_deps = $$resolve_depends(qt_module_deps, "QT.")
contains(qt_module_deps, qml): \
contains(QT_CONFIG, static):contains(TEMPLATE, .*app):!host_build:!no_import_scan {
# run qmlimportscanner
qtPrepareTool(QMLIMPORTSCANNER, qmlimportscanner)
qtPrepareTool(QMLIMPORTSCANNER, qmlimportscanner, _SYS)
for (MODULE, QT_MODULES) {
PATH = $$eval(QT.$${MODULE}.qml)
!isEmpty(PATH):exists($$PATH): QMLPATHS += $$PATH
@ -89,8 +89,8 @@ contains(qt_module_deps, qml): \
for (QMLPATH, QMLPATHS): \
IMPORTPATHS += -importPath $$QMLPATH
#message(run $$QMLIMPORTSCANNER $$_PRO_FILE_PWD_ $$IMPORTPATHS)
JSON = $$system($$QMLIMPORTSCANNER $$_PRO_FILE_PWD_ $$IMPORTPATHS)
#message(run $$QMLIMPORTSCANNER_SYS $$_PRO_FILE_PWD_ $$IMPORTPATHS)
JSON = $$system($$QMLIMPORTSCANNER_SYS $$_PRO_FILE_PWD_ $$IMPORTPATHS)
parseJson(JSON, IMPORTS)| error("Failed to parse qmlimportscanner output.")