Improve clean mechanism for plugininfo

pull/1/head
Simon Stürz 2018-04-06 11:34:28 +02:00 committed by Michael Zanetti
parent ee6166770a
commit ec2054ad98
1 changed files with 4 additions and 10 deletions

View File

@ -17,8 +17,7 @@ snappy{
}
# Make the device plugin json file visible in the Qt Creator
OTHER_FILES+=$$PWD/$${TARGET}/deviceplugin"$$TARGET".json
OTHER_FILES += $$PWD/$${TARGET}/deviceplugin"$$TARGET".json
# NOTE: if the code includes "plugininfo.h", it would fail if we only give it a compiler for $$OUT_PWD/plugininfo.h
# Let's add a dummy target with the plugininfo.h file without any path to allow the developer to just include it like that.
@ -40,14 +39,9 @@ extern_plugininfo_dummy.commands = $$extern_plugininfo.commands
QMAKE_EXTRA_TARGETS += extern_plugininfo extern_plugininfo_dummy
# Clean up autogenerated plugin info files
clean_plugininfo.commands = \
rm -fv $${OUT_PWD}/$${TARGET}/plugininfo.h; \
rm -fv $${PWD}/$${TARGET}/plugininfo.h;
clean_extern_plugininfo.commands = \
rm -fv $${OUT_PWD}/$${TARGET}/extern-plugininfo.h; \
rm -fv $${PWD}/$${TARGET}/extern-plugininfo.h;
clean.depends = clean_plugininfo clean_extern_plugininfo
QMAKE_EXTRA_TARGETS += clean clean_plugininfo clean_extern_plugininfo
plugininfo_clean.commands = rm -fv $$OUT_PWD/plugininfo.h $$OUT_PWD/extern-plugininfo.h
clean.depends = plugininfo_clean
QMAKE_EXTRA_TARGETS += clean plugininfo_clean
# Install translation files
TRANSLATIONS *= $$files($${PWD}/$${TARGET}/translations/*ts, true)