Commit 27563451 authored by Kai Koehne's avatar Kai Koehne Committed by Eike Ziller

Allow plugins to depend on plugins outside of creator source tree

Do try to resolve plugin_dependencies.pri files in all directories
set by QTC_PLUGIN_DIRS. Also fail if a dependencies_pri file cannot
be resolved.

Change-Id: I2c14db832cef0fcc97a2f0351847c4969f5bd420
Reviewed-by: default avatarOswald Buddenhagen <oswald.buddenhagen@digia.com>
parent 9dd60b34
...@@ -153,8 +153,12 @@ macx { ...@@ -153,8 +153,12 @@ macx {
INCLUDEPATH += \ INCLUDEPATH += \
$$IDE_BUILD_TREE/src \ # for <app/app_version.h> $$IDE_BUILD_TREE/src \ # for <app/app_version.h>
$$IDE_SOURCE_TREE/src/libs \ $$IDE_SOURCE_TREE/src/libs \
$$IDE_SOURCE_TREE/tools \ $$IDE_SOURCE_TREE/tools
$$IDE_SOURCE_TREE/src/plugins
QTC_PLUGIN_DIRS += $$IDE_SOURCE_TREE/src/plugins
for (dir, QTC_PLUGIN_DIRS) {
INCLUDEPATH += $$dir
}
CONFIG += depend_includepath CONFIG += depend_includepath
...@@ -203,7 +207,16 @@ for(ever) { ...@@ -203,7 +207,16 @@ for(ever) {
break() break()
done_plugins += $$QTC_PLUGIN_DEPENDS done_plugins += $$QTC_PLUGIN_DEPENDS
for(dep, QTC_PLUGIN_DEPENDS) { for(dep, QTC_PLUGIN_DEPENDS) {
include($$PWD/src/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)
LIBS += -l$$qtLibraryName($$QTC_PLUGIN_NAME) LIBS += -l$$qtLibraryName($$QTC_PLUGIN_NAME)
} }
QTC_PLUGIN_DEPENDS = $$unique(QTC_PLUGIN_DEPENDS) QTC_PLUGIN_DEPENDS = $$unique(QTC_PLUGIN_DEPENDS)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment