aboutsummaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@digia.com>2012-12-18 12:00:29 +0100
committerJoerg Bornemann <joerg.bornemann@digia.com>2012-12-21 10:28:49 +0100
commit77302f5c3964f4da0b2dbff4f35fa6acd600f56c (patch)
treeff2ed2e10d9f0b6bd39de06bbdfc2298302fa85d /share
parentaabd7459f30acfb963037e96cd68d7724440f809 (diff)
introduce qt.core.frameworkBuild
The bool property qt.core.frameworkBuild must be set to true on for framework builds of Qt on Mac OS. Task-number: QBS-182 Change-Id: Ida94ede578d6d68bc4d13e00cae60e436679e889 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'share')
-rw-r--r--share/qbs/modules/qt/QtModule.qbs6
-rw-r--r--share/qbs/modules/qt/core/qtcore.qbs9
2 files changed, 8 insertions, 7 deletions
diff --git a/share/qbs/modules/qt/QtModule.qbs b/share/qbs/modules/qt/QtModule.qbs
index bc4a015f5..afa3d5c4e 100644
--- a/share/qbs/modules/qt/QtModule.qbs
+++ b/share/qbs/modules/qt/QtModule.qbs
@@ -26,13 +26,13 @@ Module {
var paths = [incPath, modulePath];
if (qt.core.versionMajor >= 5)
paths.unshift(FileInfo.joinPaths(modulePath, qtVersion, includeDirName));
- if (qbs.targetOS === "mac")
+ if (qt.core.frameworkBuild)
paths.unshift(libPath + '/' + includeDirName + qtLibInfix + '.framework/Versions/' + qt.core.versionMajor + '/Headers');
return paths;
}
- cpp.dynamicLibraries: qbs.targetOS !== 'mac' ? [internalLibraryName] : undefined
- cpp.frameworks: qbs.targetOS === 'mac' ? [internalLibraryName] : undefined
+ cpp.dynamicLibraries: qt.core.frameworkBuild ? undefined : [internalLibraryName]
+ cpp.frameworks: qt.core.frameworkBuild ? [internalLibraryName] : undefined
cpp.defines: [ "QT_" + qtModuleName.toUpperCase() + "_LIB" ]
}
}
diff --git a/share/qbs/modules/qt/core/qtcore.qbs b/share/qbs/modules/qt/core/qtcore.qbs
index 3f7eed414..35f42ff37 100644
--- a/share/qbs/modules/qt/core/qtcore.qbs
+++ b/share/qbs/modules/qt/core/qtcore.qbs
@@ -19,6 +19,7 @@ Module {
property var versionMajor: versionParts[0]
property var versionMinor: versionParts[1]
property var versionPatch: versionParts[2]
+ property bool frameworkBuild: qbs.targetOS === 'mac'
property string generatedFilesDir: 'GeneratedFiles/' + product.name // ### TODO: changing this property does not change the path in the rule ATM.
property string qmFilesDir: {
if (qbs.targetOS === "mac" && product.type.indexOf('applicationbundle') >= 0)
@@ -41,7 +42,7 @@ Module {
}
cpp.includePaths: {
var paths = [mkspecPath];
- if (qbs.targetOS === "mac")
+ if (frameworkBuild)
paths.push(libPath + '/QtCore' + libInfix + '.framework/Versions/' + versionMajor + '/Headers');
paths.push(incPath + '/QtCore');
paths.push(incPath);
@@ -53,9 +54,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('Core' + libInfix, versionMajor, qbs)] : undefined
- cpp.frameworkPaths: qbs.targetOS === 'mac' ? [libPath] : undefined
- cpp.frameworks: qbs.targetOS === 'mac' ? [QtFunctions.getLibraryName('Core' + libInfix, versionMajor, qbs)] : undefined
+ cpp.dynamicLibraries: frameworkBuild ? undefined : [QtFunctions.getLibraryName('Core' + libInfix, versionMajor, qbs)]
+ cpp.frameworkPaths: frameworkBuild ? [libPath] : undefined
+ cpp.frameworks: frameworkBuild ? [QtFunctions.getLibraryName('Core' + libInfix, versionMajor, qbs)] : undefined
cpp.rpaths: qbs.targetOS === 'linux' ? [libPath] : undefined
cpp.positionIndependentCode: versionMajor >= 5 ? true : undefined
cpp.cxxFlags: {