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)
commit9e21879f361dfe9978fb5159664cae352301064b
tree2de22bd1dfc6b136d3e2ae0d78310290d6c224c3
parent59eccc3cb0f65357a93fbbab83a6287c56fa31fe
Avoid race conditions in the build system

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.
data/CMakeLists.txt
icons/CMakeLists.txt
pics/CMakeLists.txt
po/CMakeLists.txt
src/CMakeLists.txt
src/client/CMakeLists.txt
src/common/CMakeLists.txt
src/core/CMakeLists.txt