qt_add_dbus_interfaces

Synopsis

qt_add_dbus_interfaces(<VAR> dbus_spec1 [dbus_spec2 ...])  # added in Qt 5.15

qt5_add_dbus_interfaces(<VAR> dbus_spec1 [dbus_spec2 ...])

Description

Generates C++ sources implementing D-Bus interfaces defined in dbus_spec1, dbus_spec2, where each argument needs to be the path to a valid D-Bus interface description file. The paths of the generated files are added to <VAR>.

For each argument, a call to the Qt D-Bus XML compiler (qdbusxml2cpp) in interface (proxy) mode is set up.

The generated C++ source files are named after the XML file: For the file org.example.chat.xml the generated header will be named orgexamplechatinterface.h.

Options

Options can be set using set_source_file_property on each of the file arguments:

OptionValueDescription
CLASSNAMEclass_nameOverride the default interface class name with class_name.
NO_NAMESPACEbooleanDo not generate the namespaced name if set to ON.
INCLUDEpathAdd an #include "path" in the generated code.

© 2021 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.