1--- a/src/tools/macdeployqt/shared/shared.cpp
2+++ b/src/tools/macdeployqt/shared/shared.cpp
3@@ -1300,9 +1300,12 @@ bool deployQmlImports(const QString &appBundlePath, DeploymentInfo deploymentInf
4 }
5 for (const QString &importPath : qmlImportPaths)
6 argumentList << "-importPath" << importPath;
7+
8 QString qmlImportsPath = QLibraryInfo::path(QLibraryInfo::QmlImportsPath);
9- argumentList.append( "-importPath");
10- argumentList.append(qmlImportsPath);
11+ if (QFile::exists(qmlImportsPath)) {
12+ argumentList.append( "-importPath");
13+ argumentList.append(qmlImportsPath);
14+ }
15
16 // In a modularized installation of qt as we have in Nix, instead, we will
17 // read the paths from the environment, as they are spread in multiple