aboutsummaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@digia.com>2013-02-07 16:21:22 +0100
committerJoerg Bornemann <joerg.bornemann@digia.com>2013-02-08 11:11:36 +0100
commit83d3d92a7249872386c3c6ed0e16904213fc432b (patch)
treeb43c15bfb3dceb061b66a021d3c17eaaa0c714a2 /share
parentd10dc818cee2a56d03156f9c95c7e19d164d25ea (diff)
Make the qbs.platforms property a bit more generic.
The target OS can now have an arbitrary value and automatically introduces a platform of the same name. Change-Id: I36db932f9d46460a2badaa0b04dce6b73d8407fd Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'share')
-rw-r--r--share/qbs/modules/qbs/common.qbs12
1 files changed, 5 insertions, 7 deletions
diff --git a/share/qbs/modules/qbs/common.qbs b/share/qbs/modules/qbs/common.qbs
index 564f81303..c029e1f1b 100644
--- a/share/qbs/modules/qbs/common.qbs
+++ b/share/qbs/modules/qbs/common.qbs
@@ -11,16 +11,14 @@ Module {
property string pathSeparator: hostOS === "windows" ? "\\" : "/"
property string targetOS: hostOS
property var targetPlatform: {
+ var platforms = [targetOS];
if (targetOS === "linux")
- return [ "unix", "linux" ];
+ platforms.push("unix");
else if (targetOS === "android")
- return [ "unix", "android" ];
+ platforms.push("linux", "unix");
else if (targetOS === "mac")
- return [ "unix", "darwin", "mac" ];
- else if (targetOS === "windows")
- return [ "windows" ];
- else
- throw "Unknown targetOS: \"" + targetOS + "\""
+ platforms.push("darwin", "unix");
+ return platforms
}
property string profile
property string toolchain