Get dependencies from the output of ``rcc --list`` if using
Qt 5. Otherwise process the file in the same way as the
qt4_add_resources macro.
This does not work for RCC files which are generated.
The cmake_autogen build step is implemented as a PRE_BUILD step
of the target currently if possible, rather than a standalone
custom target. This is to keep the number of (synthesized)
custom targets that appear in the UI low, but in some cases
it is necessary to fall back to a full custom target.
Fall back to a full custom target for the VS builds if autorcc
is used.
Disallow the use of config-specific source files with
the Visual Studio and Xcode generators. They don't have
any way to represent the condition currently.
Use the same common-config API in cmQtAutoGenerators. While
it accepts config-specific files, it doesn't have to support
multiple configurations yet.
Loop over the configs in cmTargetTraceDependencies
and cmGlobalGenerator::WriteSummary and consume all source
files.
Loop over the configs in cmComputeTargetDepends and compute the
object library dependencies for each config.
Don't store a mapping of the directory to the ui file. The directory
will be a unique key, allowing only one ui file to be specified.
Use the source file name instead as the mapping key.
The rcc tool generates a cpp file with a symbol called qInitResources
or called qInitResources_${name}, if the name is passed. The
qInitResources symbol clashes if multiple qrc files are used in
one target.
Always pass the name to ensure that the symbol is unique. This is also
the behavior of the qtx_add_resource macros.
Visual Studio is handled as a special case for autogen depends. However,
the special handling works only for target dependencies, not file
dependencies output by a custom command.
Use a PRE_BUILD step only if all depends are targets.
The qtx_add_resources() macro adds the resource file to the output list
to maintain file-level dependencies. Having the qrc file in a target
sources is a precondition for AUTORCC to function.
When processing the source files of a target, only add the generated
qrc_<file>.cpp to the target sources if AUTORCC is ON. This avoids
pre-porting conflict with the macro.
Reported-by: Micha Hergarden
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.
Don't try to show the windows, which would require a gui capable test
machine, and that's not guaranteed.
Automatically link to qtmain.a on Windows to avoid a policy warning. Set
policy CMP0020 to NEW by increasing the required version.
Don't attempt to run the test when using Windows.