Difference between revisions of "Talk:Development/Tutorials/D-Bus/Creating Interfaces"

Jump to: navigation, search
(The [[{{PAGENAME}}#CMake|CMake section]] needs some love from someone who actually knows how this stuff works. I'm getting 'Unknown CMake command "qt4_add_dbus_adaptor".' from CMake so the CMakeLists.)
 
Line 1: Line 1:
 
The [[{{PAGENAME}}#CMake|CMake section]] needs some love from someone who actually knows how this stuff works. I'm getting 'Unknown CMake command "qt4_add_dbus_adaptor".' from CMake so the CMakeLists.txt files obviously need some magic to make the DBUS stuff work. — [[User:Japsu|Japsu]] 21:00, 18 February 2007 (CET)
 
The [[{{PAGENAME}}#CMake|CMake section]] needs some love from someone who actually knows how this stuff works. I'm getting 'Unknown CMake command "qt4_add_dbus_adaptor".' from CMake so the CMakeLists.txt files obviously need some magic to make the DBUS stuff work. — [[User:Japsu|Japsu]] 21:00, 18 February 2007 (CET)
 +
 +
 +
The following can be automated using cmake as well:
 +
<code>
 +
$> qdbuscpp2xml -M -s background.h -o org.foo.Background.xml
 +
</code>
 +
using
 +
<code>
 +
add_custom_command( OUTPUT org.foo.Background.xml
 +
    COMMAND qdbuscpp2xml -M -s ${CMAKE_CURRENT_SOURCE_DIR}/background.h -o org.foo.background.xml
 +
    DEPENDS background.h
 +
)
 +
</code>
 +
And for this I had to change the following:
 +
<code>
 +
QT4_ADD_DBUS_ADAPTOR(foo_SRCS org.foo.Background.xml
 +
                    background.h Background)
 +
</code>
 +
to
 +
<code>
 +
QT4_ADD_DBUS_ADAPTOR(foo_SRCS ${CMAKE_CURRENT_BINARY_DIR}/org.foo.Background.xml
 +
                    background.h Background)
 +
</code>

Revision as of 16:41, 4 October 2008

The CMake section needs some love from someone who actually knows how this stuff works. I'm getting 'Unknown CMake command "qt4_add_dbus_adaptor".' from CMake so the CMakeLists.txt files obviously need some magic to make the DBUS stuff work. — Japsu 21:00, 18 February 2007 (CET)


The following can be automated using cmake as well: $> qdbuscpp2xml -M -s background.h -o org.foo.Background.xml using add_custom_command( OUTPUT org.foo.Background.xml

   COMMAND qdbuscpp2xml -M -s ${CMAKE_CURRENT_SOURCE_DIR}/background.h -o org.foo.background.xml
   DEPENDS background.h

) And for this I had to change the following: QT4_ADD_DBUS_ADAPTOR(foo_SRCS org.foo.Background.xml

                    background.h Background)

to QT4_ADD_DBUS_ADAPTOR(foo_SRCS ${CMAKE_CURRENT_BINARY_DIR}/org.foo.Background.xml

                    background.h Background)


KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V.Legal