Auto-generated XML interfaces and dependencies

Andreas Pakulat apaku at gmx.de
Fri Dec 21 16:57:55 CET 2007


On 21.12.07 15:36:23, Thomas McGuire wrote:
> Hello,
> 
> recently I changed the XML D-Bus interface from being hand-written to being 
> auto-generated by calling qt4_generate_dbus_interface on the kmkernel.h 
> header file.
> Other applications in KDEPIM also use this XML interface, for example 
> KOrganizer does with 
> >qt4_add_dbus_interfaces(korganizer_eventviewer_LIB_SRCS 
> ${CMAKE_BINARY_DIR}/kmail/org.kde.kmail.kmail.xml)
> 
> This means KOrganizer needs the XML file from KMail's build directory. It 
> seems that this creates problems with parallel builds, where things like
> > No rule to make target `kmail/org.kde.kmail.kmail.xml', needed by 
> `kontact/plugins/kmail/kmailinterface.cpp
> happen.
> 
> One workaround is to manually add dependencies to KMail, for example with 
> >add_dependencies(korganizer_eventviewer kmail)
> This is not very elegant, and it reduces the parallelism.
> 
> Has anybody got a better solution for this problem? David Faure suggested to 
> move the call of qt4_generate_dbus_interface to the toplevel CMake file of 
> KDEPIM instead of KMail's. Is this a sound solution?

If David suggests so it surely is an ok solution. Another option would
be to have qt4_generate_dbus_interface create a target by using the 2nd
signature for add_custom_command. Then you could add a dependecy between
your app/lib and that target. 

Andreas

-- 
In the stairway of life, you'd best take the elevator.


More information about the Kde-buildsystem mailing list