aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@digia.com>2012-11-21 17:24:32 +0100
committerJoerg Bornemann <joerg.bornemann@digia.com>2012-11-23 11:35:40 +0100
commit869be1a75467cac0e03f63aa05abecc407cd7374 (patch)
tree7111f7a7c9f08a47a6c3ece3c3516bdde6312d4a
parentde2a2618f3efb846b2d2e0d71591dc583822b4c2 (diff)
adjust Qt5 library names according to latest changes
Change-Id: Id7c5d1e0fa2891c2d865d062bdc69ab4e25f4b2d Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
-rw-r--r--share/qbs/modules/qt/QtModule.qbs10
-rw-r--r--share/qbs/modules/qt/core/qtcore.qbs4
-rw-r--r--share/qbs/modules/qt/qtfunctions.js9
3 files changed, 14 insertions, 9 deletions
diff --git a/share/qbs/modules/qt/QtModule.qbs b/share/qbs/modules/qt/QtModule.qbs
index 73f4bf120..4a7e6cfa1 100644
--- a/share/qbs/modules/qt/QtModule.qbs
+++ b/share/qbs/modules/qt/QtModule.qbs
@@ -14,20 +14,20 @@ Module {
property string libPath: qt.core.libPath
property string qtLibInfix: qt.core.libInfix
property string repository: qt.core.versionMajor === 5 ? 'qtbase' : undefined
- property string internalQtModuleName: 'Qt' + qtModuleName
- property string internalLibraryName: QtFunctions.getLibraryName(internalQtModuleName + qtLibInfix, qt.core.versionMajor, qbs, cpp)
+ property string includeDirName: 'Qt' + qtModuleName
+ property string internalLibraryName: QtFunctions.getLibraryName(qtModuleName + qtLibInfix, qt.core.versionMajor, qbs, cpp)
property string qtVersion: qt.core.version
Properties {
condition: qtModuleName != undefined
cpp.includePaths: {
- var modulePath = FileInfo.joinPaths(incPath, internalQtModuleName);
+ var modulePath = FileInfo.joinPaths(incPath, includeDirName);
var paths = [incPath, modulePath];
if (qt.core.versionMajor >= 5)
- paths.unshift(FileInfo.joinPaths(modulePath, qtVersion, internalQtModuleName));
+ paths.unshift(FileInfo.joinPaths(modulePath, qtVersion, includeDirName));
if (qbs.targetOS === "mac")
- paths.unshift(libPath + '/' + internalQtModuleName + qtLibInfix + '.framework/Versions/' + qt.core.versionMajor + '/Headers');
+ paths.unshift(libPath + '/' + includeDirName + qtLibInfix + '.framework/Versions/' + qt.core.versionMajor + '/Headers');
return paths;
}
diff --git a/share/qbs/modules/qt/core/qtcore.qbs b/share/qbs/modules/qt/core/qtcore.qbs
index 5b018cff9..f56a1055c 100644
--- a/share/qbs/modules/qt/core/qtcore.qbs
+++ b/share/qbs/modules/qt/core/qtcore.qbs
@@ -53,9 +53,9 @@ Module {
if (qbs.targetOS === 'windows' && !product.consoleApplication)
return ["qtmain" + libInfix + (cpp.debugInformation ? "d" : "") + (qbs.toolchain !== "mingw" ? ".lib" : "")];
}
- cpp.dynamicLibraries: qbs.targetOS !== 'mac' ? [QtFunctions.getLibraryName('QtCore' + libInfix, versionMajor, qbs, cpp)] : undefined
+ cpp.dynamicLibraries: qbs.targetOS !== 'mac' ? [QtFunctions.getLibraryName('Core' + libInfix, versionMajor, qbs, cpp)] : undefined
cpp.frameworkPaths: qbs.targetOS === 'mac' ? [libPath] : undefined
- cpp.frameworks: qbs.targetOS === 'mac' ? [QtFunctions.getLibraryName('QtCore' + libInfix, versionMajor, qbs, cpp)] : undefined
+ cpp.frameworks: qbs.targetOS === 'mac' ? [QtFunctions.getLibraryName('Core' + libInfix, versionMajor, qbs, cpp)] : undefined
cpp.rpaths: qbs.targetOS === 'linux' ? [libPath] : undefined
cpp.positionIndependentCode: versionMajor >= 5 ? true : undefined
diff --git a/share/qbs/modules/qt/qtfunctions.js b/share/qbs/modules/qt/qtfunctions.js
index 15b77ebe8..50c6ae6a7 100644
--- a/share/qbs/modules/qt/qtfunctions.js
+++ b/share/qbs/modules/qt/qtfunctions.js
@@ -2,9 +2,14 @@
function getLibraryName(qtModule, versionMajor, qbs, cpp)
{
- var libName = qtModule;
+ var libName = "Qt";
+ if (versionMajor >= 5)
+ libName += versionMajor;
+ libName += qtModule;
if (qbs.targetOS === 'windows') {
- libName = qtModule + (cpp.debugInformation ? 'd' : '') + versionMajor;
+ libName += (cpp.debugInformation ? 'd' : '');
+ if (versionMajor < 5)
+ libName += versionMajor;
if (qbs.toolchain !== "mingw")
libName += '.lib';
}