diff options
-rw-r--r-- | app/app.qbs | 3 | ||||
-rw-r--r-- | perfparser.qbs | 10 | ||||
-rw-r--r-- | tests/auto/addresscache/addresscache.qbs | 8 |
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"] } |