Avoid race conditions in the build system
authorManuel Nickschas <sputnick@quassel-irc.org>
Fri, 28 Mar 2014 23:57:22 +0000 (00:57 +0100)
committerManuel Nickschas <sputnick@quassel-irc.org>
Fri, 28 Mar 2014 23:57:22 +0000 (00:57 +0100)
Adding resource files in multiple targets is a bad idea, because CMake
will happily generate them multiple times too, and unfortunately also
in the same location. With Qt5, this actually lead to a misgenerated
oxygen_kde.qrc some times.

Now we add the resources in the module they belong to, which not only
avoids these race conditions, but also saves some time during compile,
because every resource file is only processed once now.

Changing this triggered yet another race condition, where not all translations
would be generated by the time the corresponding .qrc was needed. Adding
a fugly add_dependencies(mod_common po) fixes this; however we may want to
find a cleaner way to properly express deps between the language files and the
qrc.


No differences found