Using the QT4_ADD_RESOURCES() macro required the resource file to exist
already for dependency scanning. This prevented the use of resource
files that are generated by cmake because it needs the file before
resolving the dependency. This patch adds support for generated
resource files by not scanning the resource file for dependencies if it
doesn't exist yet. The add_custom_command() to generate the resource
file should add the dependencies on the files used by the resource file.
Adding VERBATIM to the ADD_CUSTOM_COMMAND calls in the qt4 macros
ensures that paths are properly quoted when passed to the shell.
This fixes issues when building projects that contained paths with
special characters (according to /bin/sh), such as parentheses or
spaces.
Fix bug 11120. Parameters files previously went into source
directory when qt4_generate_moc() was given relative paths.
Also simplified some logic for absolute paths.
Qt4Macros.cmake: all the "public" macros of FindQt4.cmake
Qt4ConfigDependentSettings.cmake: the code for detecting the
Qt-configuration dependent additional libraries, e.g. when linking statically.
There should be no functional changes in this patch.
The patch reduces the length of FindQt4.cmake from 1700 lines to around 1000
lines, which is still long enough, but this should make the file a easier to
handle (and it is similar to what we do in KDE with FindKDE4Internal.cmake
and KDE4Macros.cmake)
Ok by Clinton.
Alex