aboutsummaryrefslogtreecommitdiffstats
path: root/examples/rpaths/rpaths.qbs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/rpaths/rpaths.qbs')
-rw-r--r--examples/rpaths/rpaths.qbs58
1 files changed, 58 insertions, 0 deletions
diff --git a/examples/rpaths/rpaths.qbs b/examples/rpaths/rpaths.qbs
new file mode 100644
index 000000000..1e5411468
--- /dev/null
+++ b/examples/rpaths/rpaths.qbs
@@ -0,0 +1,58 @@
+import qbs.FileInfo
+
+Project {
+ condition: qbs.targetOS.contains("unix")
+
+ //! [0]
+ DynamicLibrary {
+ Depends { name: "cpp" }
+ Depends { name: "bundle" }
+ name: "LibraryA"
+ bundle.isBundle: false
+ cpp.sonamePrefix: qbs.targetOS.contains("macos") ? "@rpath" : undefined
+ cpp.rpaths: cpp.rpathOrigin
+ cpp.cxxLanguageVersion: "c++11"
+ files: [
+ "objecta.cpp",
+ "objecta.h",
+ ]
+ install: true
+ installDir: "examples/lib"
+ }
+ //! [0]
+
+ //! [1]
+ DynamicLibrary {
+ Depends { name: "cpp" }
+ Depends { name: "bundle" }
+ Depends { name: "LibraryA" }
+ name: "LibraryB"
+ bundle.isBundle: false
+ cpp.cxxLanguageVersion: "c++11"
+ cpp.sonamePrefix: qbs.targetOS.contains("macos") ? "@rpath" : undefined
+ cpp.rpaths: cpp.rpathOrigin
+ files: [
+ "objectb.cpp",
+ "objectb.h",
+ ]
+ install: true
+ installDir: "examples/lib"
+ }
+ //! [1]
+
+ //! [2]
+ CppApplication {
+ Depends { name: "bundle" }
+ Depends { name: "LibraryA" }
+ Depends { name: "LibraryB" }
+ name: "rpaths-app"
+ files: "main.cpp"
+ consoleApplication: true
+ bundle.isBundle: false
+ cpp.rpaths: FileInfo.joinPaths(cpp.rpathOrigin, "..", "lib")
+ cpp.cxxLanguageVersion: "c++11"
+ install: true
+ installDir: "examples/bin"
+ }
+ //! [2]
+}