Auto-generated XML interfaces and dependencies

Thomas McGuire thomas.mcguire at gmx.net
Sat Jan 12 15:34:16 CET 2008


Hello,

On Saturday 29 December 2007, Alexander Neundorf wrote:
> I guess then one way would be to add a helper target
> add_custom_target(CREATE_DBUS_STUFF)
> which creates all the dbus xml interfaces, and have all the targets which
> need these interfaces depend on this helper target.
>
> OTOH, if other targets need some part of what is built when kmail is being
> built, then it doesn't seem to be that wrong to make them depend on kmail
> (or the helper target).
That sounds like a good idea. I don't know enough about CMake to do this myself
though, can anyone help? 
I tried the following in the KMail CMake file:

>add_custom_target( kmail_xml,
>                   COMMAND qt4_generate_dbus_interface( kmkernel.h org.kde.kmail.kmail.xml OPTIONS -a )
>                   COMMAND qt4_generate_dbus_interface( kmcomposewin.h org.kde.kmail.mailcomposer.xml OPTIONS -a )
>)

But that seems to be invalid syntax.
What is the right way to do this?

Afterwards, I simply do the following then, right?
>add_dependencies(kontact_kmailplugin kmail_xml)

What I find strange is that we currently have
>add_dependencies(kontact_kmailplugin kmail)
in there, which means that the Kontact KMail plugin depends on KMail. This however
does not seem to work, there are still errors like
> make[3]: *** No rule to make target `kmail/org.kde.kmail.kmail.xml',
> needed by `kontact/plugins/kmail/kmailinterface.cpp'.  Stop.
> make[2]: *** [kontact/plugins/kmail/CMakeFiles/kcm_kmailsummary.dir/all] Error 2
What are we doing wrong there?
The CMake files are in kdepim/kmail/CMakeLists.txt and in
kdepim/kontact/plugins/kmail/CMakeLists.txt.
Can anybody have a look at that please?

Thanks,
Thomas

P.S. Sorry for the late response



More information about the Kde-buildsystem mailing list