[cmake-developers] [CMake 0011884]: The target of qt4_add_dbus_interface should automatically depend on its generation.

Mantis Bug Tracker mantis at public.kitware.com
Mon Feb 21 10:21:29 EST 2011


The following issue has been SUBMITTED. 
====================================================================== 
http://public.kitware.com/Bug/view.php?id=11884 
====================================================================== 
Reported By:                Stephen Kelly
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   11884
Category:                   (No Category)
Reproducibility:            have not tried
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2011-02-21 10:21 EST
Last Modified:              2011-02-21 10:21 EST
====================================================================== 
Summary:                    The target of qt4_add_dbus_interface should
automatically depend on its generation.
Description: 
If you use qt4_generate_dbus_interface() to generate an xml file, you may have a
qt4_add_dbus_interfaces() within the same project to consume the dbus interface.
In that case you must ensure that the xml file is generated before they are
consumed.

You can do that by creating a custom target which encapsulates the dependencies.

macro(my_generate_dbus_interface _header _customName )
  qt4_generate_dbus_interface(${_header} ${_customName} ${ARGN} )
  add_custom_target(xml_target_${_header} DEPENDS ${_customName})
  add_dependencies(dbus_interfaces_xml xml_target_${_header} )
endmacro()

Then use my_generate_dbus_interface instead of qt4_generate_dbus_interface.

However, this should not be necessary. qt4_add_dbus_interfaces could depend on
the xml file existing. Or maybe there's an even better solution.
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2011-02-21 10:21 Stephen Kelly  New Issue                                    
======================================================================




More information about the cmake-developers mailing list