aboutsummaryrefslogtreecommitdiffstats
path: root/share/qbs/module-providers/Qt/templates/qml.js
diff options
context:
space:
mode:
Diffstat (limited to 'share/qbs/module-providers/Qt/templates/qml.js')
-rw-r--r--share/qbs/module-providers/Qt/templates/qml.js26
1 files changed, 22 insertions, 4 deletions
diff --git a/share/qbs/module-providers/Qt/templates/qml.js b/share/qbs/module-providers/Qt/templates/qml.js
index 36f60f8a3..38462dcf7 100644
--- a/share/qbs/module-providers/Qt/templates/qml.js
+++ b/share/qbs/module-providers/Qt/templates/qml.js
@@ -39,16 +39,32 @@ function getPrlRhs(line)
return line.split('=')[1].trim();
}
-function getLibsForPlugin(pluginData, buildVariant, targetOS, toolchain, qtLibDir, qtDir)
+function getLibsForPlugin(pluginData, product)
{
+ var targetOS = product.qbs.targetOS;
+ var toolchain = product.qbs.toolchain;
+ var buildVariant = product.Qt.core.qtBuildVariant;
+ var qtLibDir = product.Qt.core.libPath;
+ var qtPluginDir = product.Qt.core.pluginPath;
+ var qtDir = product.Qt.core.installPrefixPath;
+ var qtQmlPath = product.Qt.qml.qmlPath;
+
if (!pluginData.path)
return "";
var prlFileName = "";
if (!targetOS.contains("windows"))
prlFileName += "lib";
prlFileName += pluginData.plugin;
- if (buildVariant === "debug" && targetOS.contains("windows"))
- prlFileName += "d";
+ if (buildVariant === "debug") {
+ if (targetOS.contains("windows")) {
+ prlFileName += "d";
+ } else if (product.Qt.core.versionMajor >= 6 &&
+ (targetOS.contains("ios")
+ || targetOS.contains("tvos")
+ || targetOS.contains("watchos"))) {
+ prlFileName += "_debug";
+ }
+ }
prlFileName += ".prl";
var prlFilePath = FileInfo.joinPaths(pluginData.path, prlFileName);
if (!File.exists(prlFilePath)) {
@@ -74,8 +90,10 @@ function getLibsForPlugin(pluginData, buildVariant, targetOS, toolchain, qtLibDi
otherLibsLine = otherLibsLine.replace(/-l([^ ]+)/g, "$1" + ".lib");
}
otherLibsLine = otherLibsLine.replace(/\$\$\[QT_INSTALL_LIBS\]/g, qtLibDir);
+ otherLibsLine = otherLibsLine.replace(/\$\$\[QT_INSTALL_PLUGINS\]/g, qtPluginDir);
otherLibsLine = otherLibsLine.replace(/\$\$\[QT_INSTALL_PREFIX\]/g, qtDir);
- otherLibs = otherLibs.concat(otherLibsLine.split(' '));
+ otherLibsLine = otherLibsLine.replace(/\$\$\[QT_INSTALL_QML\]/g, qtQmlPath);
+ otherLibs = otherLibs.concat(otherLibsLine.split(' ').map(FileInfo.cleanPath));
}
}
if (!pluginLib)