diff options
author | Christian Kandeler <christian.kandeler@qt.io> | 2022-03-22 15:58:26 +0100 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@qt.io> | 2022-03-25 15:56:16 +0000 |
commit | 6c57af7269d32663cbdb36c5c8939d928bda983a (patch) | |
tree | ee197c20b77542f81e15d1ba492f00f941d7fd0d | |
parent | ea199ebaa096913fd456f6ec1d433be904b85dbd (diff) | |
download | qbs-6c57af7269d32663cbdb36c5c8939d928bda983a.tar.gz |
Qt support: Consider QT_INSTALL_PREFIX when reading .prl files
... for gathering plugin dependencies with static builds.
Task-number: QBS-1692
Change-Id: I57322da56c5145cec0250f204b4b06a3a9140bf6
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
-rw-r--r-- | share/qbs/module-providers/Qt/setup-qt.js | 1 | ||||
-rw-r--r-- | share/qbs/module-providers/Qt/templates/core.qbs | 1 | ||||
-rw-r--r-- | share/qbs/module-providers/Qt/templates/qml.js | 3 | ||||
-rw-r--r-- | share/qbs/module-providers/Qt/templates/qml.qbs | 3 |
4 files changed, 6 insertions, 2 deletions
diff --git a/share/qbs/module-providers/Qt/setup-qt.js b/share/qbs/module-providers/Qt/setup-qt.js index 6dd42312c..c7efef014 100644 --- a/share/qbs/module-providers/Qt/setup-qt.js +++ b/share/qbs/module-providers/Qt/setup-qt.js @@ -1425,6 +1425,7 @@ function replaceSpecialValues(content, module, qtProps, abi) { qtConfig: ModUtils.toJSLiteral(qtProps.qtConfigItems), binPath: ModUtils.toJSLiteral(qtProps.binaryPath), installPath: ModUtils.toJSLiteral(qtProps.installPath), + installPrefixPath: ModUtils.toJSLiteral(qtProps.installPrefixPath), libPath: ModUtils.toJSLiteral(qtProps.libraryPath), libExecPath: ModUtils.toJSLiteral(qtProps.libExecPath), qmlLibExecPath: ModUtils.toJSLiteral(qtProps.qmlLibExecPath), diff --git a/share/qbs/module-providers/Qt/templates/core.qbs b/share/qbs/module-providers/Qt/templates/core.qbs index 18ad5a2ab..fd81930ba 100644 --- a/share/qbs/module-providers/Qt/templates/core.qbs +++ b/share/qbs/module-providers/Qt/templates/core.qbs @@ -43,6 +43,7 @@ Module { property path installPath: @installPath@ property path incPath: @incPath@ property path libPath: @libPath@ + property path installPrefixPath: @installPrefixPath@ property path libExecPath: @libExecPath@ property path qmlLibExecPath: @qmlLibExecPath@ property path pluginPath: @pluginPath@ diff --git a/share/qbs/module-providers/Qt/templates/qml.js b/share/qbs/module-providers/Qt/templates/qml.js index a159aa907..36f60f8a3 100644 --- a/share/qbs/module-providers/Qt/templates/qml.js +++ b/share/qbs/module-providers/Qt/templates/qml.js @@ -39,7 +39,7 @@ function getPrlRhs(line) return line.split('=')[1].trim(); } -function getLibsForPlugin(pluginData, buildVariant, targetOS, toolchain, qtLibDir) +function getLibsForPlugin(pluginData, buildVariant, targetOS, toolchain, qtLibDir, qtDir) { if (!pluginData.path) return ""; @@ -74,6 +74,7 @@ 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_PREFIX\]/g, qtDir); otherLibs = otherLibs.concat(otherLibsLine.split(' ')); } } diff --git a/share/qbs/module-providers/Qt/templates/qml.qbs b/share/qbs/module-providers/Qt/templates/qml.qbs index 88e973141..747558f10 100644 --- a/share/qbs/module-providers/Qt/templates/qml.qbs +++ b/share/qbs/module-providers/Qt/templates/qml.qbs @@ -174,7 +174,8 @@ QtModule { product.Qt.core.qtBuildVariant, product.qbs.targetOS, product.qbs.toolchain, - product.Qt.core.libPath); + product.Qt.core.libPath, + product.Qt.core.installPrefixPath); for (var i = 0; i < libs.length; ++i) { var lib = libs[i]; if (!lib.endsWith(product.cpp.objectSuffix) |