summaryrefslogtreecommitdiffstats
path: root/examples/statemachine
diff options
context:
space:
mode:
authorJuha Vuolle <juha.vuolle@insta.fi>2021-03-31 20:40:05 +0300
committerJuha Vuolle <juha.vuolle@insta.fi>2021-04-01 10:37:54 +0300
commitda8498e2d0ea1b5b41b6da960fde8008948be16b (patch)
treeb8dafd556aa72ad6b82dc6a7418838189a915088 /examples/statemachine
parent0f733c0c581ef12af8b5fbb3ab75ede68a2d3403 (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. Pick-to: 6.1 Task-number: QTBUG-60045 Change-Id: Ifc184eb95aa465f6e7ab832b4c13017f81a47e88 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'examples/statemachine')
-rw-r--r--examples/statemachine/CMakeLists.txt12
1 files changed, 6 insertions, 6 deletions
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()