From de5fec59507ae91abcc715b137ebd66708a0fd2b Mon Sep 17 00:00:00 2001 From: Michael Zanetti Date: Wed, 18 Nov 2020 17:07:59 +0100 Subject: [PATCH] Add a note for including extern-plugininfo.h for plugin developers --- tools/nymea-plugininfocompiler/plugininfocompiler.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/nymea-plugininfocompiler/plugininfocompiler.cpp b/tools/nymea-plugininfocompiler/plugininfocompiler.cpp index 5c8fd059..f7eb0c98 100644 --- a/tools/nymea-plugininfocompiler/plugininfocompiler.cpp +++ b/tools/nymea-plugininfocompiler/plugininfocompiler.cpp @@ -153,7 +153,12 @@ int PluginInfoCompiler::compile(const QString &inputFile, const QString &outputF QString header; header.append("/* This file is generated by the nymea build system. Any changes to this file will *\n"); - header.append(" * be lost. If you want to change this file, edit the plugin's json file. */\n"); + header.append(" * be lost. If you want to change this file, edit the plugin's json file. *\n"); + header.append(" * *\n"); + header.append(" * NOTE: This file can be included only once per plugin. If you need to access *\n"); + header.append(" * definitions from this file in multiple source files, use *\n"); + header.append(" * #include extern-plugininfo.h *\n"); + header.append(" * instead and re-run qmake. */\n"); write(header); writeExtern(header);