From 1ac1ad2ecd6e317aed229a86893c9f6ea25bb118 Mon Sep 17 00:00:00 2001
From: Kai Koehne <kai.koehne@digia.com>
Date: Fri, 24 Jan 2014 14:38:54 +0100
Subject: [PATCH] Use QTC_PLUGIN_DIRS also for generating the dependencies
 files

Use the same logic as in 27563451cb6286 to resolve out-of-source plugin
dependencies when generating the .pluginspec files.

Change-Id: I3a62527ff381aed0e83a7c37a50da403f0a6cece
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
---
 src/qtcreatorplugin.pri | 22 ++++++++++++++++++++--
 1 file changed, 20 insertions(+), 2 deletions(-)

diff --git a/src/qtcreatorplugin.pri b/src/qtcreatorplugin.pri
index c243fa11801..4877cd19426 100644
--- a/src/qtcreatorplugin.pri
+++ b/src/qtcreatorplugin.pri
@@ -17,11 +17,29 @@ include(../qtcreator.pri)
 # for substitution in the .pluginspec
 dependencyList = "<dependencyList>"
 for(dep, plugin_deps) {
-    include($$PWD/plugins/$$dep/$${dep}_dependencies.pri)
+    dependencies_file =
+    for(dir, QTC_PLUGIN_DIRS) {
+        exists($$dir/$$dep/$${dep}_dependencies.pri) {
+            dependencies_file = $$dir/$$dep/$${dep}_dependencies.pri
+            break()
+        }
+    }
+    isEmpty(dependencies_file): \
+        error("Plugin dependency $$dep not found")
+    include($$dependencies_file)
     dependencyList += "        <dependency name=\"$$QTC_PLUGIN_NAME\" version=\"$$QTCREATOR_VERSION\"/>"
 }
 for(dep, plugin_recmds) {
-    include($$PWD/plugins/$$dep/$${dep}_dependencies.pri)
+    dependencies_file =
+    for(dir, QTC_PLUGIN_DIRS) {
+        exists($$dir/$$dep/$${dep}_dependencies.pri) {
+            dependencies_file = $$dir/$$dep/$${dep}_dependencies.pri
+            break()
+        }
+    }
+    isEmpty(dependencies_file): \
+        error("Plugin dependency $$dep not found")
+    include($$dependencies_file)
     dependencyList += "        <dependency name=\"$$QTC_PLUGIN_NAME\" version=\"$$QTCREATOR_VERSION\" type=\"optional\"/>"
 }
 dependencyList += "    </dependencyList>"
-- 
GitLab