Avoid using the moc from Qt 5 with Qt 4 based targets. Moc generates
a version check to ensure that such generated code does not compile.
The Qt4And5Automoc unit test should have been testing this, but it
was not because the test was broken. In that unit test, moc was run
on trivial files which have no significant content, and in particular
no Q_OBJECT macro. Therefore moc was generating empty files which
do not even contain the version check. Fix this by generating files
for input to moc at cmake time.
Populate a separate vector of files and append them separately. This
was the pattern used prior to commit 035b6908 (Autogen: Split AutoRcc
handling into two methods, 2013-12-10), which was erroneously not
maintained in that refactoring.
Transitively consume the property from linked dependents.
Implement configuration-specific support by following the pattern
set out for compile definitions and includes in cmQtAutoGenerators.
Implement support for origin-tracking with CMAKE_DEBUG_TARGET_PROPERTIES.
This is motivated by the needs of KDE, which provides a separate
translation system based on gettext instead of the Qt linguist
translation system. The Qt uic tool provides command line options
for configuring the method used to translate text, and to add an
include directive to the generated file to provide the method.
http://thread.gmane.org/gmane.comp.kde.devel.frameworks/7930/focus=7992
Implement the interface to provide the uic options as a usage-requirement
on the KI18n target, as designed for KDE.
The SetupAutoGenerateTarget method will soon be invoked at a later
time in a followup commit. We need to ensure that we create the
utility autogen target early.
The source files are already processed by cmQtAutomoc to look for
moc includes, so extend that to also look for ui_ includes and
find corresponding .ui files to process.
This replaces the need to invoke qt4_wrap_ui().
As the ui files are not likely to be part of the SOURCES of the
target, store the options associated with them separately in the
cmMakefile for querying during the autogen run.
There is no need for a "cmake_automoc" backward compatibility command
because it is internal, undocumented, and only executed from a matching
version of cmake.