This command was introduced in Qt 6.1.
The
qt6_add_statecharts
macro instructs CMake to invoke the qscxmlc tool to read the provided .scxml files and produce C++ source and header files, that contain the classes that implement the state machines as defined in SCXML.
qt6_add_statecharts(<TARGET> file1.scxml [file2.scxml ...] [OPTIONS ...])
For further instructions, options and examples please refer to 使用 Qt SCXML 编译器 (qscxmlc)