diff options
author | Juha Vuolle <juha.vuolle@insta.fi> | 2021-03-31 20:40:05 +0300 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-04-01 08:23:11 +0000 |
commit | 5de8ccc925b5cefc35ee30778f71cee6b040de51 (patch) | |
tree | 0e01c18fb2232f6abe5170e1a1253a7bd7262731 | |
parent | aed140e0adb91591452b0c15e53e2548616fe1fc (diff) |
Enable non-gui builds of qtscxml and statemachine examples
This commit enables building the modules against Qt with -no-gui set.
While library compilations were possible, the examples failed to
compile as QML libraries may be present without gui. This is
different root cause than in the original bug item due to the
qmake => cmake migration, but end goal of this commit is the same.
Additionally the few examples without gui dependency are now built.
For clarity: most auto tests link against gui and are thus not 'enabled'
as part of this commit.
Task-number: QTBUG-60045
Change-Id: Ifc184eb95aa465f6e7ab832b4c13017f81a47e88
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit da8498e2d0ea1b5b41b6da960fde8008948be16b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | examples/CMakeLists.txt | 2 | ||||
-rw-r--r-- | examples/scxml/CMakeLists.txt | 2 | ||||
-rw-r--r-- | examples/statemachine/CMakeLists.txt | 12 |
3 files changed, 8 insertions, 8 deletions
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 4d8af6f..0342831 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -5,7 +5,7 @@ qt_examples_build_begin() if(TARGET Qt::Scxml) add_subdirectory(scxml) endif() -if(TARGET Qt::StateMachine AND QT_FEATURE_qeventtransition) +if(TARGET Qt::StateMachine) add_subdirectory(statemachine) endif() diff --git a/examples/scxml/CMakeLists.txt b/examples/scxml/CMakeLists.txt index 49d76b4..29cdff0 100644 --- a/examples/scxml/CMakeLists.txt +++ b/examples/scxml/CMakeLists.txt @@ -16,7 +16,7 @@ if (QT_FEATURE_scxml_ecmascriptdatamodel) endif() endif() -if(TARGET Qt::Qml) +if(TARGET Qt::Qml AND TARGET Qt::Gui) add_subdirectory(calculator-qml) add_subdirectory(trafficlight-qml-static) add_subdirectory(trafficlight-qml-dynamic) diff --git a/examples/statemachine/CMakeLists.txt b/examples/statemachine/CMakeLists.txt index 5ddc90e..e80fa00 100644 --- a/examples/statemachine/CMakeLists.txt +++ b/examples/statemachine/CMakeLists.txt @@ -1,10 +1,10 @@ # Generated from widgets.pro. -if(NOT TARGET Qt::Widgets) - return() -endif() -add_subdirectory(graphicsview) add_subdirectory(statemachine) -if(QT_FEATURE_animation) - add_subdirectory(animation) + +if(TARGET Qt::Widgets) + add_subdirectory(graphicsview) + if(QT_FEATURE_animation) + add_subdirectory(animation) + endif() endif() |