On Monday 20 September 2010, Kelly Burkhart wrote:
> Hello, I'm in the process of converting our build system from qmake to
> cmake.  We have a number of projects that use uic3 rather than uic and
> I'm having a difficult time figuring out how to run the older command.
>
> I've tried copying QT4_WRAP_UI to a differently named macro and
> changing the 'COMMAND ${QT_UIC_EXECUTABLE}' line to: 'COMMAND
> ${QT_UIC3_EXECUTABLE}' with no luck.
>
> As I continue to dig into this has anyone else come up with a recipe
> for doing this?

In KDE4 we support this.
In KDE4Macros.cmake, search for "KDE4_ADD_UI3_FILES"
http://websvn.kde.org/trunk/KDE/kdelibs/cmake/modules/KDE4Macros.cmake?view=markup

There add_custom_command() is used three time for the three files which have 
to be generated (header, source and moc).
Instead of calling uic3 directly a cmake script kde4uic.cmake is called. IIRC 
the reason for this is that in KDE we have to replace some strings in the 
generated files. If you don't need that, you can put the commands used in 
kde4uic.cmake in the execute_process() calls directly into the 
add_custom_command() calls in kde4_add_ui3_files(), instead of calling cmake 
there:

http://websvn.kde.org/trunk/KDE/kdelibs/cmake/modules/kde4uic.cmake?view=markup

Alex
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to