[cmake-developers] AUTOUIC and AUTORCC for Qt

Rolf Eike Beer eike at sf-mail.de
Fri Sep 20 15:18:01 EDT 2013


Am Montag, 16. September 2013, 10:12:41 schrieb Stephen Kelly:
> Hi there,
> 
> I've pushed the Qt-auto-generators topic to my clone.
> 
>  https://gitorious.org/cmake/steveires-cmake/commits/Qt-auto-generators
> 
> It is a proof of concept for features similar to AUTOMOC, but for invoking
> the uic and rcc tools shipped with Qt. I'd like to generalize the AUTOMOC
> feature to be able to remove more of the need to use macros with Qt for ui
> files and rcc files.

Does that become something like a "put anything into the source list"? I 
thought about something like this:

add_executable(foo foo.cpp foo.h foo.ui main.cpp junk.xml)

And in CMake there is a set of filters that can be enabled by properties (like 
the AUTOMOC) one.

Something like this

filter_cpp() -> add to compiler inputs
filter_automoc() -> the automoc stuff
filter_header() -> just mark as used
filter_ui() -> uic
filter_rcc() -> qrc
filter_res() -> add to linker inputs on Windows, just mark as used on other 
platforms

The junk.xml file is not accepted by any filter, so it would raise an error as 
"unknown source file".

It would become extremely useful if such filters could be added by CMake code. 
Think of KDE just adding a filter for kcfg files so they could just be added to 
the targets as an ordinary source file.

Greeting,

Eike
-- 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20130920/e78c7fdc/attachment.sig>


More information about the cmake-developers mailing list