summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2020-09-25 10:28:04 +0200
committerChristian Kandeler <christian.kandeler@qt.io>2020-09-25 08:57:30 +0000
commit37720832aa0212c51cbd60f43dda7dc9a4f2f425 (patch)
treee73dae2608dde6e363ca04eaa022fe0e56299967
parent269119290dfa92f17f9bf363623a11bc4f4b331e (diff)
tst_addresscache: Fix qbs build
While we're at it, also consider the ELFUTILS_INSTALL_DIR environment variable. Change-Id: Ifeb5cc7df6e29426633d27a840185ba67ed838b6 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
-rw-r--r--app/app.qbs3
-rw-r--r--perfparser.qbs10
-rw-r--r--tests/auto/addresscache/addresscache.qbs8
3 files changed, 17 insertions, 4 deletions
diff --git a/app/app.qbs b/app/app.qbs
index 71eff96..0e11526 100644
--- a/app/app.qbs
+++ b/app/app.qbs
@@ -9,7 +9,8 @@ QtcTool {
Depends { name: "Qt.network" }
cpp.defines: base.filter(function(def) { return def != "QT_RESTRICTED_CAST_FROM_ASCII"; })
- cpp.includePaths: ["/usr/include/elfutils"]
+ cpp.includePaths: project.includePaths
+ cpp.libraryPaths: project.libPaths
cpp.dynamicLibraries: ["dw", "elf"]
files: [
diff --git a/perfparser.qbs b/perfparser.qbs
index 7b141e7..1f6c05e 100644
--- a/perfparser.qbs
+++ b/perfparser.qbs
@@ -1,4 +1,5 @@
-import qbs
+import qbs.Environment
+import qbs.FileInfo
Project {
name: "Perf Parser"
@@ -6,6 +7,13 @@ Project {
property bool withAutotests: qbs.buildVariant === "debug"
+ property string installBase: Environment.getEnv("ELFUTILS_INSTALL_DIR")
+ property stringList includePaths: installBase
+ ? [FileInfo.joinPaths(installBase, "include"),
+ FileInfo.joinPaths(installBase, "include", "elfutils")]
+ : "/usr/include/elfutils"
+ property stringList libPaths: installBase ? [FileInfo.joinPaths(installBase, "lib")] : []
+
references: [
"app",
"tests",
diff --git a/tests/auto/addresscache/addresscache.qbs b/tests/auto/addresscache/addresscache.qbs
index d234288..9c8d0b3 100644
--- a/tests/auto/addresscache/addresscache.qbs
+++ b/tests/auto/addresscache/addresscache.qbs
@@ -7,7 +7,11 @@ QtcAutotest {
"../../../app/perfelfmap.cpp",
"../../../app/perfelfmap.h",
"../../../app/perfaddresscache.cpp",
- "../../../app/perfaddresscache.h"
+ "../../../app/perfaddresscache.h",
+ "../../../app/perfdwarfdiecache.cpp",
+ "../../../app/perfdwarfdiecache.h",
]
- cpp.includePaths: base.concat(["../../../app"])
+ cpp.includePaths: base.concat(["../../../app"]).concat(project.includePaths)
+ cpp.libraryPaths: project.libPaths
+ cpp.dynamicLibraries: ["dw", "elf"]
}