cmake: Add support for generating .qrc files
authorManuel Nickschas <sputnick@quassel-irc.org>
Wed, 15 Aug 2018 23:25:43 +0000 (01:25 +0200)
committerManuel Nickschas <sputnick@quassel-irc.org>
Sun, 18 Nov 2018 10:06:43 +0000 (11:06 +0100)
commita7acde8447823f9cd5f25aae569a1ec3a0174073
treee4cbf9e6b6831f80e4f6ba29e0a839ac99565448
parent1e40fc6bc04df8f658f677ca5be4c970f150dc10
cmake: Add support for generating .qrc files

Most .qrc files we use just map the (partial) contents of a
directory, so that can be autogenerated. Provide CMake functions
that support this endeavour to remove the need of regenerating
resource files if directory contents changes.

Since RCC is stupid, some hacks are required to make this work,
so we can't use either autorcc nor qt5_add_resource(); we must
invoke RCC manually. Clever use of targets and custom commands
as well as external CMake script invocation ensures that the .qrc
files are always up to date even if files change, while avoiding
useless rebuilds (as is currently still the case for i18n).
cmake/GenerateQrc.cmake [new file with mode: 0644]
cmake/QuasselMacros.cmake