Ancient versions of CMake required else(), endif(), and similar block
termination commands to have arguments matching the command starting the
block. This is no longer the preferred style.
Run the following shell code:
for c in else endif endforeach endfunction endmacro endwhile; do
echo 's/\b'"$c"'\(\s*\)(.\+)/'"$c"'\1()/'
done >convert.sed &&
git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' |
egrep -z -v '^(Utilities/cm|Source/kwsys/)' |
egrep -z -v 'Tests/CMakeTests/While-Endwhile-' |
xargs -0 sed -i -f convert.sed &&
rm convert.sed
-convert the filename to lowercase before the extraction, this allows this to
work even if the filename as uppercase ".XML" extension
-use get_filename_component(... NAME) to strip the path
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