Merge PR #160: Fix make lupdate
This commit is contained in:
commit
35417f9748
@ -24,9 +24,10 @@ QMAKE_EXTRA_TARGETS += licensecheck
|
|||||||
# make lupdate to update .ts files
|
# make lupdate to update .ts files
|
||||||
CORE_TRANSLATIONS += $$files($${top_srcdir}/translations/*.ts, true)
|
CORE_TRANSLATIONS += $$files($${top_srcdir}/translations/*.ts, true)
|
||||||
lupdate.commands = lupdate -recursive -no-obsolete $${top_srcdir} -ts $${CORE_TRANSLATIONS};
|
lupdate.commands = lupdate -recursive -no-obsolete $${top_srcdir} -ts $${CORE_TRANSLATIONS};
|
||||||
|
lupdate.commands += make -C plugins/mock plugininfo;
|
||||||
PLUGIN_TRANSLATIONS += $$files($${top_srcdir}/plugins/mock/translations/*.ts, true)
|
PLUGIN_TRANSLATIONS += $$files($${top_srcdir}/plugins/mock/translations/*.ts, true)
|
||||||
lupdate.commands += lupdate -recursive -no-obsolete $${top_builddir}/plugins/mock/ -ts $${PLUGIN_TRANSLATIONS};
|
lupdate.commands += lupdate -recursive -no-obsolete $${top_builddir}/plugins/mock/ -ts $${PLUGIN_TRANSLATIONS};
|
||||||
lupdate.depends = FORCE
|
lupdate.depends = FORCE qmake_all
|
||||||
TRANSLATIONS = $${CORE_TRANSLATIONS} $${PLUGIN_TRANSLATIONS}
|
TRANSLATIONS = $${CORE_TRANSLATIONS} $${PLUGIN_TRANSLATIONS}
|
||||||
|
|
||||||
# make lrelease to compile .ts to .qm
|
# make lrelease to compile .ts to .qm
|
||||||
|
|||||||
@ -10,28 +10,27 @@ LIBS += -L../../libnymea -lnymea
|
|||||||
HEADERS += plugininfo.h
|
HEADERS += plugininfo.h
|
||||||
|
|
||||||
# Create plugininfo file
|
# Create plugininfo file
|
||||||
JSONFILES = deviceplugin"$$TARGET".json
|
JSONFILE=$$PWD/$$TARGET/deviceplugin"$$TARGET".json
|
||||||
plugininfo.target = plugininfo.h
|
plugininfo.input = JSONFILE
|
||||||
plugininfo.output = plugininfo.h
|
plugininfo.output = plugininfo.h
|
||||||
plugininfo.CONFIG = no_link
|
plugininfo.CONFIG = no_link target_predeps
|
||||||
plugininfo.input = JSONFILES
|
plugininfo.commands = $$top_srcdir/plugins/nymea-generateplugininfo \
|
||||||
plugininfo.commands = touch ${QMAKE_FILE_OUT}; $$top_srcdir/plugins/nymea-generateplugininfo \
|
|
||||||
--filetype i \
|
--filetype i \
|
||||||
--jsonfile ${QMAKE_FILE_NAME} \
|
--jsonfile $$PWD/$$TARGET/deviceplugin"$$TARGET".json \
|
||||||
--output ${QMAKE_FILE_OUT} \
|
--output plugininfo.h \
|
||||||
--builddir $$OUT_PWD;
|
--builddir $$OUT_PWD;
|
||||||
|
extern-plugininfo.input = JSONFILE
|
||||||
externplugininfo.target = extern-plugininfo.h
|
extern-plugininfo.output = extern-plugininfo.h
|
||||||
externplugininfo.output = extern-plugininfo.h
|
extern-plugininfo.CONFIG = no_link target_predeps
|
||||||
externplugininfo.CONFIG = no_link
|
extern-plugininfo.commands = $$top_srcdir/libnymea/plugin/nymea-generateplugininfo \
|
||||||
externplugininfo.input = JSONFILES
|
|
||||||
externplugininfo.commands = touch ${QMAKE_FILE_OUT}; $$top_srcdir/plugins/nymea-generateplugininfo \
|
|
||||||
--filetype e \
|
--filetype e \
|
||||||
--jsonfile ${QMAKE_FILE_NAME} \
|
--jsonfile $$PWD/$$TARGET/deviceplugin"$$TARGET".json \
|
||||||
--output ${QMAKE_FILE_OUT} \
|
--output extern-plugininfo.h \
|
||||||
--builddir $$OUT_PWD;
|
--builddir $$OUT_PWD;
|
||||||
PRE_TARGETDEPS += compiler_plugininfo_make_all compiler_externplugininfo_make_all
|
# Add it as a compiler, so it will be called before building like moc
|
||||||
QMAKE_EXTRA_COMPILERS += plugininfo externplugininfo
|
QMAKE_EXTRA_COMPILERS += plugininfo extern-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 extern-plugininfo
|
||||||
|
|
||||||
# Install plugin
|
# Install plugin
|
||||||
target.path = $$[QT_INSTALL_LIBS]/nymea/plugins/
|
target.path = $$[QT_INSTALL_LIBS]/nymea/plugins/
|
||||||
|
|||||||
Reference in New Issue
Block a user