aboutsummaryrefslogtreecommitdiffstats
path: root/src/qtcreatorplugin.pri
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@digia.com>2013-10-02 11:42:24 +0200
committerOswald Buddenhagen <oswald.buddenhagen@digia.com>2013-10-02 13:57:22 +0200
commit68609ca8a5507d5e192e8f60470dc9bc6fd45ce1 (patch)
tree6106403d3d46646603a0d64accf3d77ef9fe6ba9 /src/qtcreatorplugin.pri
parentd411c076436a1ce1c03d38b9713618e0c4fdadb4 (diff)
make plugin _dependencies.pri file optional
plugins that cannot be depended upon don't need it. of course, the project file needs to directly define the respective variables instead. this makes it possible to have stand-alone plugins in arbitrarily named directories. Change-Id: I166d997bb4db41feac9ffe897cefce382e533bb0 Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Diffstat (limited to 'src/qtcreatorplugin.pri')
-rw-r--r--src/qtcreatorplugin.pri10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/qtcreatorplugin.pri b/src/qtcreatorplugin.pri
index 16c353c67a..811227bbc2 100644
--- a/src/qtcreatorplugin.pri
+++ b/src/qtcreatorplugin.pri
@@ -1,4 +1,12 @@
-include($$replace(_PRO_FILE_PWD_, ([^/]+$), \\1/\\1_dependencies.pri))
+depfile = $$replace(_PRO_FILE_PWD_, ([^/]+$), \\1/\\1_dependencies.pri)
+exists($$depfile) {
+ include($$depfile)
+ isEmpty(QTC_PLUGIN_NAME): \
+ error("$$basename(depfile) does not define QTC_PLUGIN_NAME.")
+} else {
+ isEmpty(QTC_PLUGIN_NAME): \
+ error("QTC_PLUGIN_NAME is empty. Maybe you meant to create $$basename(depfile)?")
+}
TARGET = $$QTC_PLUGIN_NAME
plugin_deps = $$QTC_PLUGIN_DEPENDS