Auto-generated XML interfaces and dependencies

Thomas McGuire thomas.mcguire at gmx.net
Wed Jan 16 18:38:56 CET 2008


Hi,

On Monday 14 January 2008, Alexander Neundorf wrote:
> Yes.
> COMMAND must be a system command/executable, not a cmake command.
> In CMake commas aren't used to separate arguments, simple whitespace is
> used instead.
> You can't call commands inside commands.
>
> Would the following be good enough ?
> add_dependencies(kontact_kmailplugin kmail)
No, because KOrganizer also needs the XML files and we don't want it to depend 
on KMail. I used the solution below.

> Otherwise (I guess you don't want to insert the cmake code for
> qt4_generate_dbus_interface in your CMakeLists.txt) you need to do
> something.
>
> 1.) First add the macros for generating the files:
> qt4_generate_dbus_interface(...)
> qt4_generate_dbus_interface(...)
>
> 2.) create a target which depends on these generated files:
>
> add_custom_target(kmail_xml ALL
>                   DEPENDS <generatedfile1> <generatedfile2> ...
>                   COMMENT "helper target for xml stuff")
>
> 3.) add the dependency to that target:
>
> add_dependencies(kontact_kmailplugin kmail_xml)
This seems to work, at least Dashbot didn't complain yet. Thanks very much for 
your help.
The build error I had was actually forgotten add_dependencies... But this 
solution is the best, as other parts only depend on the XML file, not on the 
whole KMail.

Cheers,
Thomas




More information about the Kde-buildsystem mailing list