Keep it as a compiler, but also add it as a target
This commit is contained in:
parent
3bd9759547
commit
4c34bcefd5
@ -10,7 +10,10 @@ LIBS += -L../../libnymea -lnymea
|
||||
HEADERS += plugininfo.h
|
||||
|
||||
# Create plugininfo file
|
||||
plugininfo.target = plugininfo
|
||||
JSONFILE=$$PWD/$$TARGET/deviceplugin"$$TARGET".json
|
||||
plugininfo.input = JSONFILE
|
||||
plugininfo.output = plugininfo.h
|
||||
plugininfo.CONFIG = no_link target_predeps
|
||||
plugininfo.commands = $$top_srcdir/plugins/nymea-generateplugininfo \
|
||||
--filetype i \
|
||||
--jsonfile $$PWD/$$TARGET/deviceplugin"$$TARGET".json \
|
||||
@ -21,10 +24,11 @@ plugininfo.commands = $$top_srcdir/plugins/nymea-generateplugininfo \
|
||||
--jsonfile $$PWD/$$TARGET/deviceplugin"$$TARGET".json \
|
||||
--output extern-plugininfo.h \
|
||||
--builddir $$OUT_PWD;
|
||||
# Add it as a compiler, so it will be called before building like moc
|
||||
QMAKE_EXTRA_COMPILERS += plugininfo
|
||||
# But also add it as a target so we can add it separately without building. E.g. for updating translations.
|
||||
QMAKE_EXTRA_TARGETS += plugininfo
|
||||
|
||||
PRE_TARGETDEPS += plugininfo
|
||||
|
||||
# Install plugin
|
||||
target.path = $$[QT_INSTALL_LIBS]/nymea/plugins/
|
||||
INSTALLS += target
|
||||
|
||||
Reference in New Issue
Block a user