Skip to content

Commit

Permalink
qmlimportscanner: Ensure the correct variant is run
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
mingwandroid authored and The Qt Project committed Mar 19, 2014
1 parent 9891c50 commit da77aaa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mkspecs/features/qt.prf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.")

Expand Down

0 comments on commit da77aaa

Please sign in to comment.