qt_add_dbus_interfaces

Generates C++ sources implementing interfaces for D-Bus interface description files.

命令的定义在 DBus 组件对于 Qt6 package. Load the package with:

find_package(Qt6 REQUIRED COMPONENTS DBus)
					

该命令在 Qt 6.0 引入。

概要

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

无版本命令 被禁用,使用 qt6_add_dbus_interfaces() 代替。它支持如此命令的一组相同自变量。

描述

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 编译器 (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 can be set using set_source_files_properties on each of the file arguments:

选项 描述
CLASSNAME class_name Override the default interface class name with class_name .
NO_NAMESPACE boolean Do not generate the namespaced name if set to ON .
INCLUDE path Add an #include "path" in the generated code.