Run a task before resources compilation in Qt Creator
I need to run a task before resources compilation start (that is the first compilation starting). Create a new target and assign to PRE_TARGETDEPS and QMAKE_EXTRA_TARGETS doesn't work since RESOURCES compilation always start before, then execute my additoonal target task and after start normal sources compilation. I still din't find a way to have some task runned as first on compilation. Someone can help me?
Not sure, but maybe hacking around it with a custom compiler could help: http://doc.qt.io/qt-5/qmake-advanced-usage.html#adding-compilers
Interesting approach but doesn't work. Just tested and RESOURCES compilation always start before all...
OK, another idea :-)
Add 2 new .pro files, like so:
main.pro before/before.pro yourCode/yourCode.pro
Then in main put this:
CONFIG += ordered TEMPLATE = subdirs SUBDIRS = before yourCode
If that does not work, I'd say the only thing left is to create a shell script and run it manually before build (or maybe switch to cmake if it supports such use case).
At first thank you for your help sierdzio. ^_^
Split project files in different part didn't like so much than, unfortunately, it seem the only way available is to execute manually my task before compilation phase as you suggested...