aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2019-05-10 14:59:59 +0200
committerChristian Kandeler <christian.kandeler@qt.io>2019-05-23 14:00:47 +0000
commit386f70fabd7a7741c303c1c58c259adfad6d2ee6 (patch)
tree2cb6709b9d3c642adcfe4838f65ccfc27cb076fb
parentbc8254e5423d775f162ff0b89cf2229ecd4d08a8 (diff)
Qt Support: Properly handle host libs
We did not take into account that these might be located in a different place than the target libs. Change-Id: I2c27b6be6c8962416f1c062cd1d51ebed45f1796 Fixes: QBS-1445 Reviewed-by: Ola Røer Thorsen <ola@silentwings.no> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
-rw-r--r--share/qbs/module-providers/Qt/setup-qt.js14
1 files changed, 13 insertions, 1 deletions
diff --git a/share/qbs/module-providers/Qt/setup-qt.js b/share/qbs/module-providers/Qt/setup-qt.js
index 318a141c9..0206a16d3 100644
--- a/share/qbs/module-providers/Qt/setup-qt.js
+++ b/share/qbs/module-providers/Qt/setup-qt.js
@@ -226,6 +226,7 @@ function getQtProperties(qmakeFilePath, qbs) {
qtProps.documentationPath = pathQueryValue(queryResult, "QT_INSTALL_DOCS");
qtProps.includePath = pathQueryValue(queryResult, "QT_INSTALL_HEADERS");
qtProps.libraryPath = pathQueryValue(queryResult, "QT_INSTALL_LIBS");
+ qtProps.hostLibraryPath = pathQueryValue(queryResult, "QT_HOST_LIBS");
qtProps.binaryPath = pathQueryValue(queryResult, "QT_HOST_BINS")
|| pathQueryValue(queryResult, "QT_INSTALL_BINS");
qtProps.documentationPath = pathQueryValue(queryResult, "QT_INSTALL_DOCS");
@@ -443,6 +444,7 @@ function makeQtModuleInfo(name, qbsName, deps) {
moduleInfo.frameworkPathsDebug = [];
moduleInfo.frameworkPathsRelease = [];
moduleInfo.libraryPaths = [];
+ moduleInfo.libDir = "";
moduleInfo.config = [];
moduleInfo.supportedPluginTypes = [];
moduleInfo.pluginData = makePluginData();
@@ -628,7 +630,7 @@ function doSetupLibraries(modInfo, qtProps, debugBuild, nonExistingPrlFiles) {
}
var prlFilePath = modInfo.isPlugin
? FileInfo.joinPaths(qtProps.pluginPath, modInfo.pluginData.type)
- : qtProps.libraryPath;
+ : (modInfo.libDir ? modInfo.libDir : qtProps.libraryPath);
if (isFramework(modInfo, qtProps)) {
prlFilePath = FileInfo.joinPaths(prlFilePath,
libraryBaseName(modInfo, qtProps, false) + ".framework");
@@ -1068,8 +1070,18 @@ function allQt5Modules(qtProps) {
for (k = 0; k < moduleInfo.includePaths.length; ++k) {
moduleInfo.includePaths[k] = moduleInfo.includePaths[k]
.replace("$$QT_MODULE_INCLUDE_BASE", qtProps.includePath)
+ .replace("$$QT_MODULE_HOST_LIB_BASE", qtProps.hostLibraryPath)
.replace("$$QT_MODULE_LIB_BASE", qtProps.libraryPath);
}
+ } else if (key.endsWith(".libs")) {
+ var libDirs = extractPaths(value, priFilePath);
+ if (libDirs.length === 1) {
+ moduleInfo.libDir = libDirs[0]
+ .replace("$$QT_MODULE_HOST_LIB_BASE", qtProps.hostLibraryPath)
+ .replace("$$QT_MODULE_LIB_BASE", qtProps.libraryPath);
+ } else {
+ moduleInfo.libDir = qtProps.libraryPath;
+ }
} else if (key.endsWith(".DEFINES")) {
moduleInfo.compilerDefines = splitNonEmpty(value, ' ');
} else if (key.endsWith(".VERSION")) {