[cmake-developers] Improvements to Qt4 macros

Rolf Eike Beer eike at sf-mail.de
Wed Jun 20 07:51:39 EDT 2012


Hi,

while wrestling with QtDBus today I found out the hard way (i.e. reading the 
source) that QT4_ADD_DBUS_INTERFACE is much more powerful than its 
documentation tells. To fix that the first patch now tells about the 
properties you may set on the input file. While at it I also added a reference 
from QT4_AUTOMOC macro to the new AUTOMOC property.

The other 2 patches improve some things I found while reading the source code.

Patch #2 uses get_filename_component to strip the path from the given input 
file (why implement something again that we already have?). It also applies 
string(TOLOWER) earlier so that an XML file with an upper or mixed case 
extension (FAT anyone?) will also be properly handled.

Patch #3 finally wraps a lot of set(...) in quotes when the argument may 
contain spaces, e.g. CMAKE_CURRENT_BINARY_DIR. It also uses LIST(APPEND) to 
add to the list of source files instead of just using set(). Together with 
additional quotes this should make things much less likely to screw up things.

If noone objects I'll merge this to next tonight. Running the testsuite 
locally did not show any errors.

Eike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-FindQt4-extend-documentation.patch
Type: text/x-patch
Size: 2803 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20120620/8bd2aa08/attachment-0003.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Qt4Macros-improve-basename-extraction-in-QT4_ADD_DBU.patch
Type: text/x-patch
Size: 1339 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20120620/8bd2aa08/attachment-0004.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-Qt4Macros-add-some-quotes-to-prevent-damage-from-spa.patch
Type: text/x-patch
Size: 3685 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20120620/8bd2aa08/attachment-0005.bin>


More information about the cmake-developers mailing list