summaryrefslogtreecommitdiffstats
path: root/examples/scxml/trafficlight-common/doc/src/trafficlight-compiling.qdocinc
blob: 1410dcb1b753f6062c6f008f7a7dcb42ad05373d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
    \section1 Compiling the State Machine

    We link against the Qt SCXML module by adding the following lines to the
    example's build files.

    \section2 \e .pro when using qmake:

    \quotefromfile trafficlight-qml-static/trafficlight-qml-static.pro
    \skipto QT
    \printline scxml

    We then specify the state machine to compile:
    \skipto STATECHARTS
    \printline scxml

    \section2 \e CMakeLists.txt when using cmake:
    \quotefromfile trafficlight-qml-static/CMakeLists.txt
    \skipto find_package
    \printline Scxml
    \skipto target_link_libraries
    \printuntil )

    We then specify the state machine to compile:
    \skipto qt6_add_statecharts
    \printuntil )

    The statechart directives \e STATECHARTS or \e qt6_add_statecharts invoke the Qt SCXML
    Compiler, \c qscxmlc, which is run automatically to generate \e statemachine.h and
    \e statemachine.cpp, which are then added appropriately as headers and sources for
    compilation.