aboutsummaryrefslogtreecommitdiffstats
path: root/examples/helloworld-complex/hello.qbs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/helloworld-complex/hello.qbs')
-rw-r--r--examples/helloworld-complex/hello.qbs39
1 files changed, 39 insertions, 0 deletions
diff --git a/examples/helloworld-complex/hello.qbs b/examples/helloworld-complex/hello.qbs
new file mode 100644
index 000000000..393179a5e
--- /dev/null
+++ b/examples/helloworld-complex/hello.qbs
@@ -0,0 +1,39 @@
+import qbs 1.0
+
+Project {
+ property bool hasSpecialFeature: true
+ Application {
+ name: 'HelloWorld-Complex'
+
+ Depends { name: 'cpp' }
+ cpp.defines: ['SOMETHING']
+
+
+ files: [
+ "src/foo.h",
+ "src/foo.cpp"
+ ]
+
+ Group {
+ condition: project.hasSpecialFeature
+ prefix: "src/"
+ files: ["specialfeature.cpp", "specialfeature.h"]
+ }
+
+ Group {
+ cpp.defines: {
+ var defines = outer.concat([
+ 'HAVE_MAIN_CPP',
+ cpp.debugInformation ? '_DEBUG' : '_RELEASE'
+ ]);
+ if (project.hasSpecialFeature)
+ defines.push("HAS_SPECIAL_FEATURE");
+ return defines;
+ }
+ prefix: "src/"
+ files: [
+ 'main.cpp'
+ ]
+ }
+ }
+}