aboutsummaryrefslogtreecommitdiffstats
path: root/qbs.qbs
diff options
context:
space:
mode:
authorJake Petroules <jake.petroules@qt.io>2017-11-06 22:22:42 -0800
committerJake Petroules <jake.petroules@qt.io>2017-11-09 03:10:49 +0000
commit2530d46c5a8a9dfba6e02b48a376545cdaf7a361 (patch)
tree77a28150bb48119675311d07de46a5b5381f1b2d /qbs.qbs
parent842740d6ef482512df326e99c0d365b90ca503b0 (diff)
Allow disabling pieces of the Qbs project by category
This allows the "resources build" to not rely on a valid Qt profile. Task-number: QBS-1238 Change-Id: I1c743a95993099250da714c794b6e0ac16133609 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'qbs.qbs')
-rw-r--r--qbs.qbs62
1 files changed, 24 insertions, 38 deletions
diff --git a/qbs.qbs b/qbs.qbs
index 9e2fb1acd..c409eefb6 100644
--- a/qbs.qbs
+++ b/qbs.qbs
@@ -3,29 +3,47 @@ import qbs 1.0
Project {
minimumQbsVersion: "1.6"
qbsSearchPaths: ["qbs-resources"]
+ property bool withCode: true
+ property bool withDocumentation: true
property bool withExamples: false
+ property bool withTests: withCode
property stringList autotestArguments: []
property stringList autotestWrapper: []
references: [
- "doc/doc.qbs",
- "doc/man/man.qbs",
"docker/docker.qbs",
"share/share.qbs",
- "src/src.qbs",
"scripts/scripts.qbs",
- "tests/auto/auto.qbs",
- "tests/fuzzy-test/fuzzy-test.qbs",
- "tests/benchmarker/benchmarker.qbs",
]
SubProject {
+ filePath: "doc/doc.qbs"
+ Properties {
+ condition: parent.withDocumentation
+ }
+ }
+
+ SubProject {
filePath: "examples/examples.qbs"
Properties {
condition: parent.withExamples
}
}
+ SubProject {
+ filePath: "src/src.qbs"
+ Properties {
+ condition: parent.withCode
+ }
+ }
+
+ SubProject {
+ filePath: "tests/tests.qbs"
+ Properties {
+ condition: parent.withTests
+ }
+ }
+
Product {
name: "version"
files: ["VERSION"]
@@ -35,36 +53,4 @@ Project {
name: "qmake project files for qbs"
files: ["**/*.pr[io]"]
}
-
- AutotestRunner {
- Depends { name: "Qt.core" }
- Depends { name: "qbs resources" }
- Depends { name: "qbs_cpp_scanner" }
- Depends { name: "qbs_qt_scanner" }
- arguments: project.autotestArguments
- wrapper: project.autotestWrapper
- environment: {
- var env = base;
- if (qbs.hostOS.contains("windows") && qbs.targetOS.contains("windows")) {
- var path = "";
- for (var i = 0; i < env.length; ++i) {
- if (env[i].startsWith("PATH=")) {
- path = env[i].substring(5);
- break;
- }
- }
- path = Qt.core.binPath + ";" + path;
- var arrayElem = "PATH=" + path;
- if (i < env.length)
- env[i] = arrayElem;
- else
- env.push(arrayElem);
- }
- if (qbs.hostOS.contains("darwin") && qbs.targetOS.contains("darwin")) {
- env.push("DYLD_FRAMEWORK_PATH=" + Qt.core.libPath);
- env.push("DYLD_LIBRARY_PATH=" + Qt.core.libPath);
- }
- return env;
- }
- }
}