Improve the handling of Qt5 modules in the build system
authorManuel Nickschas <sputnick@quassel-irc.org>
Sun, 23 Mar 2014 22:02:03 +0000 (23:02 +0100)
committerManuel Nickschas <sputnick@quassel-irc.org>
Sun, 23 Mar 2014 22:02:03 +0000 (23:02 +0100)
commit307a54f216ad4510ec8e53cb85cf3f679dfb44c5
tree373688bf345bfc658f9fa12b7f7c3a2675dacb65
parent4f1bed17fa93d62d2d1d688ef5c68563a8bf5942
Improve the handling of Qt5 modules in the build system

If a required Qt5 module is not available by the time it is needed,
CMake throws a rather fugly backtrace with a confusing error message.
To avoid this, we now check for all required Qt5 modules by calling
find_package without REQUIRED, and setting the REQUIRED pacakge property.
That way, there will be no errors during configuration, the feature
summary correctly shows the packages as missing, and then bails out
at this point, which results in a much nicer user experience.

For this to work, we also need to show the feature summary before adding
the src/ subdirectory, as this will forcefully require the modules it needs.

Additionally, this commit fixes finding lconvert (and thus translation
support) for Qt5.
CMakeLists.txt