aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--qbs.qbs10
-rw-r--r--src/lib/lib.qbs2
2 files changed, 10 insertions, 2 deletions
diff --git a/qbs.qbs b/qbs.qbs
index 62864d87f..62ee68f51 100644
--- a/qbs.qbs
+++ b/qbs.qbs
@@ -5,8 +5,14 @@ Project {
property bool enableRPath: true
property bool installApiHeaders: true
property path libInstallDir: qbs.targetOS.contains("windows") ? "bin" : "lib"
- property path libRPaths: (project.enableRPath && qbs.targetOS.contains("linux"))
- ? ["$ORIGIN/../lib"] : undefined
+ property path libRPaths: {
+ if (!project.enableRPath)
+ return undefined;
+ if (qbs.targetOS.contains("linux"))
+ return ["$ORIGIN/../lib"];
+ if (qbs.targetOS.contains("osx"))
+ return ["@loader_path/../lib"]
+ }
property path resourcesInstallDir: ""
references: [
diff --git a/src/lib/lib.qbs b/src/lib/lib.qbs
index 69c11e709..ac4c23777 100644
--- a/src/lib/lib.qbs
+++ b/src/lib/lib.qbs
@@ -27,6 +27,8 @@ Product {
condition: qbs.toolchain.contains("gcc") && !qbs.targetOS.contains("windows")
cpp.cxxFlags: ["-Werror"]
}
+ cpp.installNamePrefix: "@rpath/"
+
property string headerInstallPrefix: "/include/qbs"
Group {
name: product.name