aboutsummaryrefslogtreecommitdiffstats
path: root/tutorial/chapter-3/app/app.qbs
diff options
context:
space:
mode:
Diffstat (limited to 'tutorial/chapter-3/app/app.qbs')
-rw-r--r--tutorial/chapter-3/app/app.qbs29
1 files changed, 29 insertions, 0 deletions
diff --git a/tutorial/chapter-3/app/app.qbs b/tutorial/chapter-3/app/app.qbs
new file mode 100644
index 000000000..bb7108581
--- /dev/null
+++ b/tutorial/chapter-3/app/app.qbs
@@ -0,0 +1,29 @@
+//! [1]
+// app/app.qbs
+import qbs.FileInfo
+
+CppApplication {
+ Depends { name: "mylib" }
+ name: "My Application"
+ targetName: "myapp"
+ files: "main.c"
+ version: "1.0.0"
+
+ consoleApplication: true
+ install: true
+
+ //! [0]
+ cpp.rpaths: {
+ if (!cpp.rpathOrigin)
+ return [];
+ return [
+ FileInfo.joinPaths(
+ cpp.rpathOrigin,
+ FileInfo.relativePath(
+ FileInfo.joinPaths("/", product.installDir),
+ FileInfo.joinPaths("/", "lib")))
+ ];
+ }
+ //! [0]
+}
+//! [1]