summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt2
-rw-r--r--examples/CMakeLists.txt2
-rw-r--r--examples/scxml/CMakeLists.txt10
-rw-r--r--src/scxml/configure.cmake1
-rw-r--r--src/statemachine/configure.cmake2
-rw-r--r--tests/CMakeLists.txt2
-rw-r--r--tests/auto/CMakeLists.txt18
-rw-r--r--tests/auto/qml/qqmlstatemachine/CMakeLists.txt1
-rw-r--r--tests/auto/qstatemachine/CMakeLists.txt6
-rw-r--r--tools/qscxmlc/CMakeLists.txt1
10 files changed, 28 insertions, 17 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 533e26c..f0148d5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -11,6 +11,6 @@ project(QtScxml
)
find_package(Qt6 ${PROJECT_VERSION} CONFIG REQUIRED COMPONENTS BuildInternals Core)
-find_package(Qt6 ${PROJECT_VERSION} CONFIG OPTIONAL_COMPONENTS Gui Qml Widgets Quick OpenGL OpenGLWidgets)
+find_package(Qt6 ${PROJECT_VERSION} CONFIG OPTIONAL_COMPONENTS Gui Qml Widgets OpenGL OpenGLWidgets Network)
qt_build_repo()
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index 6d5cc84..08ba582 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)
+if(TARGET Qt::StateMachine AND QT_FEATURE_qeventtransition)
add_subdirectory(widgets)
endif()
diff --git a/examples/scxml/CMakeLists.txt b/examples/scxml/CMakeLists.txt
index 6e0220c..49d76b4 100644
--- a/examples/scxml/CMakeLists.txt
+++ b/examples/scxml/CMakeLists.txt
@@ -1,16 +1,22 @@
# Generated from scxml.pro.
-add_subdirectory(ftpclient)
+if (TARGET Qt::Network AND QT_FEATURE_scxml_ecmascriptdatamodel)
+ add_subdirectory(ftpclient)
+endif()
+
if(TARGET Qt::Widgets)
add_subdirectory(trafficlight-widgets-static)
add_subdirectory(trafficlight-widgets-dynamic)
+if (QT_FEATURE_scxml_ecmascriptdatamodel)
add_subdirectory(mediaplayer-widgets-static)
add_subdirectory(mediaplayer-widgets-dynamic)
add_subdirectory(calculator-widgets)
add_subdirectory(pinball)
add_subdirectory(sudoku)
endif()
-if(TARGET Qt::Quick)
+endif()
+
+if(TARGET Qt::Qml)
add_subdirectory(calculator-qml)
add_subdirectory(trafficlight-qml-static)
add_subdirectory(trafficlight-qml-dynamic)
diff --git a/src/scxml/configure.cmake b/src/scxml/configure.cmake
index 5629eb9..7e0f54e 100644
--- a/src/scxml/configure.cmake
+++ b/src/scxml/configure.cmake
@@ -18,6 +18,7 @@ qt_feature("scxml-ecmascriptdatamodel" PUBLIC
SECTION "SCXML"
LABEL "ECMAScript data model for QtScxml"
PURPOSE "Enables the usage of ecmascript data models in SCXML state machines."
+ CONDITION TARGET Qt::Qml # special case
)
qt_configure_add_summary_section(NAME "Qt Scxml")
qt_configure_add_summary_entry(ARGS "scxml-ecmascriptdatamodel")
diff --git a/src/statemachine/configure.cmake b/src/statemachine/configure.cmake
index f759b4b..04fd8f6 100644
--- a/src/statemachine/configure.cmake
+++ b/src/statemachine/configure.cmake
@@ -22,5 +22,5 @@ qt_feature("statemachine" PUBLIC
qt_feature_definition("statemachine" "QT_NO_STATEMACHINE" NEGATE VALUE "1")
qt_feature("qeventtransition" PUBLIC
LABEL "QEventTransition class"
- CONDITION QT_FEATURE_statemachine
+ CONDITION QT_FEATURE_statemachine AND TARGET Qt::Gui # special case
)
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index e9b300c..70a2c86 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -5,7 +5,7 @@ if(QT_BUILD_STANDALONE_TESTS)
# the standalone tests here.
cmake_minimum_required(VERSION 3.16)
project(QtScxmlTests VERSION 6.1.0 LANGUAGES C CXX)
- find_package(Qt6 ${PROJECT_VERSION} REQUIRED COMPONENTS BuildInternals Core Scxml Test)
+ find_package(Qt6 ${PROJECT_VERSION} REQUIRED COMPONENTS BuildInternals Core Scxml StateMachine Test)
find_package(Qt6 ${PROJECT_VERSION} OPTIONAL_COMPONENTS Qml Gui)
qt_set_up_standalone_tests_build()
endif()
diff --git a/tests/auto/CMakeLists.txt b/tests/auto/CMakeLists.txt
index 5331b6b..55daceb 100644
--- a/tests/auto/CMakeLists.txt
+++ b/tests/auto/CMakeLists.txt
@@ -1,13 +1,15 @@
# Generated from auto.pro.
-add_subdirectory(compiled)
-add_subdirectory(dynamicmetaobject)
-add_subdirectory(parser)
-add_subdirectory(scion)
-add_subdirectory(statemachine)
-add_subdirectory(statemachineinfo)
-add_subdirectory(qml)
-add_subdirectory(qmltest)
+if (TARGET Qt::Gui AND TARGET Qt::Qml)
+ add_subdirectory(compiled)
+ add_subdirectory(dynamicmetaobject)
+ add_subdirectory(parser)
+ add_subdirectory(scion)
+ add_subdirectory(statemachine)
+ add_subdirectory(statemachineinfo)
+ add_subdirectory(qml)
+ add_subdirectory(qmltest)
+endif()
if(NOT UIKIT)
add_subdirectory(qstatemachine)
endif()
diff --git a/tests/auto/qml/qqmlstatemachine/CMakeLists.txt b/tests/auto/qml/qqmlstatemachine/CMakeLists.txt
index 9284386..5bd7b46 100644
--- a/tests/auto/qml/qqmlstatemachine/CMakeLists.txt
+++ b/tests/auto/qml/qqmlstatemachine/CMakeLists.txt
@@ -15,7 +15,6 @@ qt_internal_add_test(tst_qqmlstatemachine
Qt::Gui
Qt::GuiPrivate
Qt::QmlPrivate
- Qt::QuickPrivate
)
## Scopes:
diff --git a/tests/auto/qstatemachine/CMakeLists.txt b/tests/auto/qstatemachine/CMakeLists.txt
index 96d6437..5a09dc6 100644
--- a/tests/auto/qstatemachine/CMakeLists.txt
+++ b/tests/auto/qstatemachine/CMakeLists.txt
@@ -1,4 +1,6 @@
# Generated from qstatemachine.pro.
-add_subdirectory(qstate)
-add_subdirectory(qstatemachine)
+if (QT_FEATURE_qeventtransition)
+ add_subdirectory(qstate)
+ add_subdirectory(qstatemachine)
+endif()
diff --git a/tools/qscxmlc/CMakeLists.txt b/tools/qscxmlc/CMakeLists.txt
index f9e6102..15411a0 100644
--- a/tools/qscxmlc/CMakeLists.txt
+++ b/tools/qscxmlc/CMakeLists.txt
@@ -6,6 +6,7 @@
qt_get_tool_target_name(target_name qscxmlc)
qt_internal_add_tool(${target_name}
+ TOOLS_TARGET Scxml
SOURCES
../../src/scxml/qscxmlcompiler.cpp ../../src/scxml/qscxmlcompiler.h ../../src/scxml/qscxmlcompiler_p.h
../../src/scxml/qscxmlerror.cpp ../../src/scxml/qscxmlerror.h