[cmake-developers] Improvements to Qt4 macros

Clinton Stimpson clinton at elemtech.com
Wed Jun 20 09:10:18 EDT 2012


On Jun 20, 2012, at 5:51 AM, Rolf Eike Beer wrote:

> 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<0001-FindQt4-extend-documentation.patch><0002-Qt4Macros-improve-basename-extraction-in-QT4_ADD_DBU.patch><0003-Qt4Macros-add-some-quotes-to-prevent-damage-from-spa.patch>

I don't think the test suite covers QtDbus.  Perhaps that can be added?
What about a case sensitive file system with .XML instead of .xml?  Does your second patch break that?
Other than that question, I have no objections.

Thanks,
Clint


More information about the cmake-developers mailing list