aboutsummaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2018-04-13 09:36:43 +0200
committerChristian Kandeler <christian.kandeler@qt.io>2018-04-13 09:36:43 +0200
commita67e0082a55449bbc680c5cd23c398e8c3def392 (patch)
tree14328310c1d8c79b366baf950b79606a842866d0 /share
parent0a036cf8a2128c728c1aa27427f2d5dc46599166 (diff)
parentfee6a037b7b28afdc2dfd6297eb089d3e5888ff7 (diff)
Merge 1.11 into master
Diffstat (limited to 'share')
-rw-r--r--share/qbs/modules/cpp/setuprunenv.js10
1 files changed, 7 insertions, 3 deletions
diff --git a/share/qbs/modules/cpp/setuprunenv.js b/share/qbs/modules/cpp/setuprunenv.js
index dfc30d20c..5d8bb5248 100644
--- a/share/qbs/modules/cpp/setuprunenv.js
+++ b/share/qbs/modules/cpp/setuprunenv.js
@@ -55,8 +55,12 @@ function addExternalLibPath(product, list, path)
}
}
-function gatherPaths(product, libPaths, frameworkPaths)
+function gatherPaths(product, libPaths, frameworkPaths, seenProducts)
{
+ if (seenProducts.contains(product.name))
+ return;
+ seenProducts.push(product.name);
+
// Gather explicitly given library paths.
if (product.cpp && product.cpp.libraryPaths)
product.cpp.libraryPaths.forEach(function(p) { addExternalLibPath(product, libPaths, p); });
@@ -92,7 +96,7 @@ function gatherPaths(product, libPaths, frameworkPaths)
loadableModuleArtifacts.forEach(addArtifact);
}
if (!dep.hasOwnProperty("present")) // Recurse if the dependency is a product. TODO: Provide non-heuristic way to decide whether dependency is a product.
- gatherPaths(dep, libPaths, frameworkPaths);
+ gatherPaths(dep, libPaths, frameworkPaths, seenProducts);
}
}
@@ -107,7 +111,7 @@ function setupRunEnvironment(product, config)
var libPaths = [];
var frameworkPaths = [];
- gatherPaths(product, libPaths, frameworkPaths);
+ gatherPaths(product, libPaths, frameworkPaths, []);
var runPaths = product.cpp ? product.cpp.systemRunPaths : undefined;
if (runPaths && runPaths.length > 0) {