summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorKai Köhne <kai.koehne@qt.io>2022-02-14 19:11:27 +0100
committerKai Köhne <kai.koehne@qt.io>2022-02-21 09:46:15 +0100
commit7f64390b777170ecdd285508b0fa6978db61cf66 (patch)
treeb9ff7d4ee70def4be8e35e92a27479b2c3b60e4f /examples
parentbe4f54e375fe141069faaf551f5873de8d7eecaa (diff)
Improve examples CMakeLists.txt
- Remove "# generated from xyz.pro" comment from pro2cmake - Remove automatic use of CMAKE_AUTORCC - Only opt into CMAKE_AUTOUIC if .ui files are involved - Remove explicit setting of CMAKE_INCLUDE_CURRENT_DIR - Combine multiple find_package(Qt6 ... calls) - use REQUIRED COMPONENTS - sort components alphabetically - Fix wrong indentations - Use (only) one empty line after multi-line commands Pick-to: 6.3 Change-Id: Iaf7286069494041e90a59cedeae30ef26713d538 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'examples')
-rw-r--r--examples/CMakeLists.txt2
-rw-r--r--examples/scxml/CMakeLists.txt2
-rw-r--r--examples/scxml/calculator-qml/CMakeLists.txt17
-rw-r--r--examples/scxml/calculator-widgets/CMakeLists.txt11
-rw-r--r--examples/scxml/ftpclient/CMakeLists.txt12
-rw-r--r--examples/scxml/invoke-dynamic/CMakeLists.txt16
-rw-r--r--examples/scxml/invoke-static/CMakeLists.txt16
-rw-r--r--examples/scxml/mediaplayer-qml-cppdatamodel/CMakeLists.txt16
-rw-r--r--examples/scxml/mediaplayer-qml-dynamic/CMakeLists.txt14
-rw-r--r--examples/scxml/mediaplayer-qml-static/CMakeLists.txt18
-rw-r--r--examples/scxml/mediaplayer-widgets-dynamic/CMakeLists.txt12
-rw-r--r--examples/scxml/mediaplayer-widgets-static/CMakeLists.txt11
-rw-r--r--examples/scxml/pinball/CMakeLists.txt15
-rw-r--r--examples/scxml/sudoku/CMakeLists.txt17
-rw-r--r--examples/scxml/trafficlight-qml-dynamic/CMakeLists.txt22
-rw-r--r--examples/scxml/trafficlight-qml-simple/CMakeLists.txt17
-rw-r--r--examples/scxml/trafficlight-qml-static/CMakeLists.txt22
-rw-r--r--examples/scxml/trafficlight-widgets-dynamic/CMakeLists.txt20
-rw-r--r--examples/scxml/trafficlight-widgets-static/CMakeLists.txt23
-rw-r--r--examples/statemachine/CMakeLists.txt2
-rw-r--r--examples/statemachine/animation/CMakeLists.txt2
-rw-r--r--examples/statemachine/animation/animatedtiles/CMakeLists.txt16
-rw-r--r--examples/statemachine/animation/moveblocks/CMakeLists.txt15
-rw-r--r--examples/statemachine/animation/states/CMakeLists.txt16
-rw-r--r--examples/statemachine/animation/stickman/CMakeLists.txt16
-rw-r--r--examples/statemachine/animation/sub-attaq/CMakeLists.txt50
-rw-r--r--examples/statemachine/graphicsview/CMakeLists.txt2
-rw-r--r--examples/statemachine/graphicsview/padnavigator/CMakeLists.txt10
-rw-r--r--examples/statemachine/statemachine/CMakeLists.txt2
-rw-r--r--examples/statemachine/statemachine/eventtransitions/CMakeLists.txt15
-rw-r--r--examples/statemachine/statemachine/factorial/CMakeLists.txt13
-rw-r--r--examples/statemachine/statemachine/pingpong/CMakeLists.txt13
-rw-r--r--examples/statemachine/statemachine/rogue/CMakeLists.txt15
-rw-r--r--examples/statemachine/statemachine/trafficlight/CMakeLists.txt15
-rw-r--r--examples/statemachine/statemachine/twowaybutton/CMakeLists.txt15
35 files changed, 193 insertions, 307 deletions
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index b679340..f7a5b02 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -1,5 +1,3 @@
-# Generated from examples.pro.
-
qt_examples_build_begin(EXTERNAL_BUILD)
if(TARGET Qt::Scxml)
diff --git a/examples/scxml/CMakeLists.txt b/examples/scxml/CMakeLists.txt
index aca06ab..3560e53 100644
--- a/examples/scxml/CMakeLists.txt
+++ b/examples/scxml/CMakeLists.txt
@@ -1,5 +1,3 @@
-# Generated from scxml.pro.
-
if (TARGET Qt::Network AND QT_FEATURE_scxml_ecmascriptdatamodel)
qt_internal_add_example(ftpclient)
endif()
diff --git a/examples/scxml/calculator-qml/CMakeLists.txt b/examples/scxml/calculator-qml/CMakeLists.txt
index 7108230..6545e47 100644
--- a/examples/scxml/calculator-qml/CMakeLists.txt
+++ b/examples/scxml/calculator-qml/CMakeLists.txt
@@ -1,32 +1,25 @@
-# Generated from calculator-qml.pro.
-
cmake_minimum_required(VERSION 3.16)
project(calculator-qml LANGUAGES CXX)
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
-
set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
+ set(INSTALL_EXAMPLESDIR "examples")
endif()
set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/scxml/calculator-qml")
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS Qml)
-find_package(Qt6 COMPONENTS Scxml)
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Scxml)
qt_add_executable(calculator-qml
calculator-qml.cpp
)
+
set_target_properties(calculator-qml PROPERTIES
WIN32_EXECUTABLE TRUE
MACOSX_BUNDLE TRUE
)
+
target_link_libraries(calculator-qml PUBLIC
Qt::Core
Qt::Gui
@@ -34,7 +27,6 @@ target_link_libraries(calculator-qml PUBLIC
Qt::Scxml
)
-
# Resources:
set(calculator-qml_resource_files
"Button.qml"
@@ -48,7 +40,6 @@ qt6_add_resources(calculator-qml "calculator-qml"
${calculator-qml_resource_files}
)
-
# Statecharts:
qt6_add_statecharts(calculator-qml
../calculator-common/statemachine.scxml
diff --git a/examples/scxml/calculator-widgets/CMakeLists.txt b/examples/scxml/calculator-widgets/CMakeLists.txt
index e9704c9..4e9db81 100644
--- a/examples/scxml/calculator-widgets/CMakeLists.txt
+++ b/examples/scxml/calculator-widgets/CMakeLists.txt
@@ -1,30 +1,27 @@
-# Generated from calculator-widgets.pro.
-
cmake_minimum_required(VERSION 3.16)
project(calculator-widgets LANGUAGES CXX)
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
-
set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
+ set(INSTALL_EXAMPLESDIR "examples")
endif()
set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/scxml/calculator-widgets")
-find_package(Qt6 COMPONENTS Core Gui Widgets Scxml)
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Scxml Widgets)
qt_add_executable(calculator-widgets
calculator-widgets.cpp
mainwindow.cpp mainwindow.h mainwindow.ui
)
+
set_target_properties(calculator-widgets PROPERTIES
WIN32_EXECUTABLE TRUE
MACOSX_BUNDLE TRUE
)
+
target_link_libraries(calculator-widgets PUBLIC
Qt6::Core
Qt6::Gui
diff --git a/examples/scxml/ftpclient/CMakeLists.txt b/examples/scxml/ftpclient/CMakeLists.txt
index 536d2d3..eb1af76 100644
--- a/examples/scxml/ftpclient/CMakeLists.txt
+++ b/examples/scxml/ftpclient/CMakeLists.txt
@@ -1,31 +1,27 @@
-# Generated from ftpclient.pro.
-
cmake_minimum_required(VERSION 3.16)
project(ftpclient LANGUAGES CXX)
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
-
set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
+ set(INSTALL_EXAMPLESDIR "examples")
endif()
set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/scxml/ftpclient")
-find_package(Qt6 COMPONENTS Core Scxml Network)
+find_package(Qt6 REQUIRED COMPONENTS Core Network Scxml)
qt_add_executable(ftpclient
ftpcontrolchannel.cpp ftpcontrolchannel.h
ftpdatachannel.cpp ftpdatachannel.h
main.cpp
)
+
set_target_properties(ftpclient PROPERTIES
WIN32_EXECUTABLE FALSE
MACOSX_BUNDLE TRUE
)
+
target_link_libraries(ftpclient PUBLIC
Qt6::Core
Qt6::Network
diff --git a/examples/scxml/invoke-dynamic/CMakeLists.txt b/examples/scxml/invoke-dynamic/CMakeLists.txt
index 9647edc..d187195 100644
--- a/examples/scxml/invoke-dynamic/CMakeLists.txt
+++ b/examples/scxml/invoke-dynamic/CMakeLists.txt
@@ -1,29 +1,25 @@
-# Generated from invoke-dynamic.pro.
-
cmake_minimum_required(VERSION 3.16)
project(invoke-dynamic LANGUAGES CXX)
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
-
set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
+ set(INSTALL_EXAMPLESDIR "examples")
endif()
set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/scxml/invoke-dynamic")
-find_package(Qt6 COMPONENTS Core Gui Qml Scxml)
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Scxml)
qt_add_executable(invoke-dynamic
invoke-dynamic.cpp
)
+
set_target_properties(invoke-dynamic PROPERTIES
WIN32_EXECUTABLE TRUE
MACOSX_BUNDLE TRUE
)
+
target_link_libraries(invoke-dynamic PUBLIC
Qt6::Core
Qt6::Gui
@@ -35,15 +31,19 @@ target_link_libraries(invoke-dynamic PUBLIC
set_source_files_properties("../invoke-common/Button.qml"
PROPERTIES QT_RESOURCE_ALIAS "Button.qml"
)
+
set_source_files_properties("../invoke-common/MainView.qml"
PROPERTIES QT_RESOURCE_ALIAS "MainView.qml"
)
+
set_source_files_properties("../invoke-common/SubView.qml"
PROPERTIES QT_RESOURCE_ALIAS "SubView.qml"
)
+
set_source_files_properties("../invoke-common/statemachine.scxml"
PROPERTIES QT_RESOURCE_ALIAS "statemachine.scxml"
)
+
set(invoke-dynamic_resource_files
"../invoke-common/Button.qml"
"../invoke-common/MainView.qml"
diff --git a/examples/scxml/invoke-static/CMakeLists.txt b/examples/scxml/invoke-static/CMakeLists.txt
index cf162b7..5e4130e 100644
--- a/examples/scxml/invoke-static/CMakeLists.txt
+++ b/examples/scxml/invoke-static/CMakeLists.txt
@@ -1,29 +1,25 @@
-# Generated from invoke-static.pro.
-
cmake_minimum_required(VERSION 3.16)
project(invoke-static LANGUAGES CXX)
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
-
set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
+ set(INSTALL_EXAMPLESDIR "examples")
endif()
set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/scxml/invoke-static")
-find_package(Qt6 COMPONENTS Core Gui Qml Scxml)
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Scxml)
qt_add_executable(invoke-static
invoke-static.cpp
)
+
set_target_properties(invoke-static PROPERTIES
WIN32_EXECUTABLE TRUE
MACOSX_BUNDLE TRUE
)
+
target_link_libraries(invoke-static PUBLIC
Qt6::Core
Qt6::Gui
@@ -35,12 +31,15 @@ target_link_libraries(invoke-static PUBLIC
set_source_files_properties("../invoke-common/Button.qml"
PROPERTIES QT_RESOURCE_ALIAS "Button.qml"
)
+
set_source_files_properties("../invoke-common/MainView.qml"
PROPERTIES QT_RESOURCE_ALIAS "MainView.qml"
)
+
set_source_files_properties("../invoke-common/SubView.qml"
PROPERTIES QT_RESOURCE_ALIAS "SubView.qml"
)
+
set(invoke-static_resource_files
"../invoke-common/Button.qml"
"../invoke-common/MainView.qml"
@@ -55,7 +54,6 @@ qt6_add_resources(invoke-static "invoke-static"
${invoke-static_resource_files}
)
-
# Statecharts:
qt6_add_statecharts(invoke-static
../invoke-common/statemachine.scxml
diff --git a/examples/scxml/mediaplayer-qml-cppdatamodel/CMakeLists.txt b/examples/scxml/mediaplayer-qml-cppdatamodel/CMakeLists.txt
index b5625fb..281fe12 100644
--- a/examples/scxml/mediaplayer-qml-cppdatamodel/CMakeLists.txt
+++ b/examples/scxml/mediaplayer-qml-cppdatamodel/CMakeLists.txt
@@ -1,33 +1,28 @@
-# Generated from mediaplayer-qml-cppdatamodel.pro.
-
cmake_minimum_required(VERSION 3.16)
project(mediaplayer-qml-cppdatamodel LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
+ set(INSTALL_EXAMPLESDIR "examples")
endif()
set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/scxml/mediaplayer-qml-cppdatamodel")
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS Qml)
-find_package(Qt6 COMPONENTS Scxml)
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Scxml)
qt_add_executable(mediaplayer-qml-cppdatamodel
mediaplayer-qml-cppdatamodel.cpp
thedatamodel.cpp thedatamodel.h
)
+
set_target_properties(mediaplayer-qml-cppdatamodel PROPERTIES
WIN32_EXECUTABLE TRUE
MACOSX_BUNDLE TRUE
)
+
target_link_libraries(mediaplayer-qml-cppdatamodel PUBLIC
Qt::Core
Qt::Gui
@@ -35,11 +30,11 @@ target_link_libraries(mediaplayer-qml-cppdatamodel PUBLIC
Qt::Scxml
)
-
# Resources:
set_source_files_properties("../mediaplayer-common/Mediaplayer.qml"
PROPERTIES QT_RESOURCE_ALIAS "Mediaplayer.qml"
)
+
set(mediaplayer-qml-cppdatamodel_resource_files
"../mediaplayer-common/Mediaplayer.qml"
"mediaplayer-qml-cppdatamodel.qml"
@@ -52,7 +47,6 @@ qt6_add_resources(mediaplayer-qml-cppdatamodel "mediaplayer-qml-cppdatamodel"
${mediaplayer-qml-cppdatamodel_resource_files}
)
-
# Statecharts:
qt6_add_statecharts(mediaplayer-qml-cppdatamodel
mediaplayer-cppdatamodel.scxml
diff --git a/examples/scxml/mediaplayer-qml-dynamic/CMakeLists.txt b/examples/scxml/mediaplayer-qml-dynamic/CMakeLists.txt
index 02ba676..facb831 100644
--- a/examples/scxml/mediaplayer-qml-dynamic/CMakeLists.txt
+++ b/examples/scxml/mediaplayer-qml-dynamic/CMakeLists.txt
@@ -1,29 +1,25 @@
-# Generated from mediaplayer-qml-dynamic.pro.
-
cmake_minimum_required(VERSION 3.16)
project(mediaplayer-qml-dynamic LANGUAGES CXX)
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
-
set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
+ set(INSTALL_EXAMPLESDIR "examples")
endif()
set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/scxml/mediaplayer-qml-dynamic")
-find_package(Qt6 COMPONENTS Core Gui Qml Scxml)
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Scxml)
qt_add_executable(mediaplayer-qml-dynamic
mediaplayer-qml-dynamic.cpp
)
+
set_target_properties(mediaplayer-qml-dynamic PROPERTIES
WIN32_EXECUTABLE TRUE
MACOSX_BUNDLE TRUE
)
+
target_link_libraries(mediaplayer-qml-dynamic PUBLIC
Qt6::Core
Qt6::Gui
@@ -35,9 +31,11 @@ target_link_libraries(mediaplayer-qml-dynamic PUBLIC
set_source_files_properties("../mediaplayer-common/Mediaplayer.qml"
PROPERTIES QT_RESOURCE_ALIAS "Mediaplayer.qml"
)
+
set_source_files_properties("../mediaplayer-common/mediaplayer.scxml"
PROPERTIES QT_RESOURCE_ALIAS "mediaplayer.scxml"
)
+
set(mediaplayer-qml-dynamic_resource_files
"../mediaplayer-common/Mediaplayer.qml"
"../mediaplayer-common/mediaplayer.scxml"
diff --git a/examples/scxml/mediaplayer-qml-static/CMakeLists.txt b/examples/scxml/mediaplayer-qml-static/CMakeLists.txt
index 76e9ce3..054e31c 100644
--- a/examples/scxml/mediaplayer-qml-static/CMakeLists.txt
+++ b/examples/scxml/mediaplayer-qml-static/CMakeLists.txt
@@ -1,32 +1,25 @@
-# Generated from mediaplayer-qml-static.pro.
-
cmake_minimum_required(VERSION 3.16)
project(mediaplayer-qml-static LANGUAGES CXX)
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
-
set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
+ set(INSTALL_EXAMPLESDIR "examples")
endif()
set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/scxml/mediaplayer-qml-static")
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS Qml)
-find_package(Qt6 COMPONENTS Scxml)
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Scxml)
qt_add_executable(mediaplayer-qml-static
mediaplayer-qml-static.cpp
)
+
set_target_properties(mediaplayer-qml-static PROPERTIES
WIN32_EXECUTABLE TRUE
MACOSX_BUNDLE TRUE
)
+
target_link_libraries(mediaplayer-qml-static PUBLIC
Qt::Core
Qt::Gui
@@ -34,11 +27,11 @@ target_link_libraries(mediaplayer-qml-static PUBLIC
Qt::Scxml
)
-
# Resources:
set_source_files_properties("../mediaplayer-common/Mediaplayer.qml"
PROPERTIES QT_RESOURCE_ALIAS "Mediaplayer.qml"
)
+
set(mediaplayer-qml-static_resource_files
"../mediaplayer-common/Mediaplayer.qml"
"mediaplayer-qml-static.qml"
@@ -51,7 +44,6 @@ qt6_add_resources(mediaplayer-qml-static "mediaplayer-qml-static"
${mediaplayer-qml-static_resource_files}
)
-
# Statecharts:
qt6_add_statecharts(mediaplayer-qml-static
../mediaplayer-common/mediaplayer.scxml
diff --git a/examples/scxml/mediaplayer-widgets-dynamic/CMakeLists.txt b/examples/scxml/mediaplayer-widgets-dynamic/CMakeLists.txt
index 5c24c9e..75a3c9f 100644
--- a/examples/scxml/mediaplayer-widgets-dynamic/CMakeLists.txt
+++ b/examples/scxml/mediaplayer-widgets-dynamic/CMakeLists.txt
@@ -1,30 +1,27 @@
-# Generated from mediaplayer-widgets-dynamic.pro.
-
cmake_minimum_required(VERSION 3.16)
project(mediaplayer-widgets-dynamic LANGUAGES CXX)
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
-
set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
+ set(INSTALL_EXAMPLESDIR "examples")
endif()
set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/scxml/mediaplayer-widgets-dynamic")
-find_package(Qt6 COMPONENTS Core Gui Widgets Scxml)
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Scxml Widgets)
qt_add_executable(mediaplayer-widgets-dynamic
../mediaplayer-common/mainwindow.cpp ../mediaplayer-common/mainwindow.h ../mediaplayer-common/mainwindow.ui
mediaplayer-widgets-dynamic.cpp
)
+
set_target_properties(mediaplayer-widgets-dynamic PROPERTIES
WIN32_EXECUTABLE TRUE
MACOSX_BUNDLE TRUE
)
+
target_link_libraries(mediaplayer-widgets-dynamic PUBLIC
Qt6::Core
Qt6::Gui
@@ -36,6 +33,7 @@ target_link_libraries(mediaplayer-widgets-dynamic PUBLIC
set_source_files_properties("../mediaplayer-common/mediaplayer.scxml"
PROPERTIES QT_RESOURCE_ALIAS "mediaplayer.scxml"
)
+
set(mediaplayer_resource_files
"../mediaplayer-common/mediaplayer.scxml"
)
diff --git a/examples/scxml/mediaplayer-widgets-static/CMakeLists.txt b/examples/scxml/mediaplayer-widgets-static/CMakeLists.txt
index a3c8b42..63f7d1f 100644
--- a/examples/scxml/mediaplayer-widgets-static/CMakeLists.txt
+++ b/examples/scxml/mediaplayer-widgets-static/CMakeLists.txt
@@ -1,30 +1,27 @@
-# Generated from mediaplayer-widgets-static.pro.
-
cmake_minimum_required(VERSION 3.16)
project(mediaplayer-widgets-static LANGUAGES CXX)
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
-
set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
+ set(INSTALL_EXAMPLESDIR "examples")
endif()
set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/scxml/mediaplayer-widgets-static")
-find_package(Qt6 COMPONENTS Core Gui Widgets Scxml)
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Scxml Widgets)
qt_add_executable(mediaplayer-widgets-static
../mediaplayer-common/mainwindow.cpp ../mediaplayer-common/mainwindow.h ../mediaplayer-common/mainwindow.ui
mediaplayer-widgets-static.cpp
)
+
set_target_properties(mediaplayer-widgets-static PROPERTIES
WIN32_EXECUTABLE TRUE
MACOSX_BUNDLE TRUE
)
+
target_link_libraries(mediaplayer-widgets-static PUBLIC
Qt6::Core
Qt6::Gui
diff --git a/examples/scxml/pinball/CMakeLists.txt b/examples/scxml/pinball/CMakeLists.txt
index 1966d38..04dfe2f 100644
--- a/examples/scxml/pinball/CMakeLists.txt
+++ b/examples/scxml/pinball/CMakeLists.txt
@@ -1,33 +1,27 @@
-# Generated from pinball.pro.
-
cmake_minimum_required(VERSION 3.16)
project(pinball LANGUAGES CXX)
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
-
set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
+ set(INSTALL_EXAMPLESDIR "examples")
endif()
set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/scxml/pinball")
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS Widgets)
-find_package(Qt6 COMPONENTS Scxml)
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Scxml Widgets)
qt_add_executable(pinball
main.cpp
mainwindow.cpp mainwindow.h mainwindow.ui
)
+
set_target_properties(pinball PROPERTIES
WIN32_EXECUTABLE TRUE
MACOSX_BUNDLE TRUE
)
+
target_link_libraries(pinball PUBLIC
Qt::Core
Qt::Gui
@@ -35,7 +29,6 @@ target_link_libraries(pinball PUBLIC
Qt::Widgets
)
-
# Statecharts:
qt6_add_statecharts(pinball
pinball.scxml
diff --git a/examples/scxml/sudoku/CMakeLists.txt b/examples/scxml/sudoku/CMakeLists.txt
index 985281e..8a0f848 100644
--- a/examples/scxml/sudoku/CMakeLists.txt
+++ b/examples/scxml/sudoku/CMakeLists.txt
@@ -1,33 +1,26 @@
-# Generated from sudoku.pro.
-
cmake_minimum_required(VERSION 3.16)
project(sudoku LANGUAGES CXX)
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
-
set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
+ set(INSTALL_EXAMPLESDIR "examples")
endif()
set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/scxml/sudoku")
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS Widgets)
-find_package(Qt6 COMPONENTS Scxml)
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Scxml Widgets)
qt_add_executable(sudoku
main.cpp
mainwindow.cpp mainwindow.h
)
+
set_target_properties(sudoku PROPERTIES
WIN32_EXECUTABLE TRUE
MACOSX_BUNDLE TRUE
)
+
target_link_libraries(sudoku PUBLIC
Qt::Core
Qt::Gui
@@ -35,7 +28,6 @@ target_link_libraries(sudoku PUBLIC
Qt::Widgets
)
-
# Resources:
set(sudoku_resource_files
"data/nearly-solved-sudoku.data"
@@ -50,7 +42,6 @@ qt6_add_resources(sudoku "sudoku"
${sudoku_resource_files}
)
-
# Statecharts:
qt6_add_statecharts(sudoku
sudoku.scxml
diff --git a/examples/scxml/trafficlight-qml-dynamic/CMakeLists.txt b/examples/scxml/trafficlight-qml-dynamic/CMakeLists.txt
index 776d72d..d285d93 100644
--- a/examples/scxml/trafficlight-qml-dynamic/CMakeLists.txt
+++ b/examples/scxml/trafficlight-qml-dynamic/CMakeLists.txt
@@ -1,29 +1,26 @@
-# Generated from trafficlight-qml-dynamic.pro.
-
cmake_minimum_required(VERSION 3.16)
project(trafficlight-qml-dynamic LANGUAGES CXX)
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
-
set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
+ set(INSTALL_EXAMPLESDIR "examples")
endif()
set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/scxml/trafficlight-qml-dynamic")
-find_package(Qt6 COMPONENTS Core Gui Qml Scxml)
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Scxml)
qt_add_executable(trafficlight-qml-dynamic
trafficlight-qml-dynamic.cpp
)
+
set_target_properties(trafficlight-qml-dynamic PROPERTIES
WIN32_EXECUTABLE TRUE
MACOSX_BUNDLE TRUE
)
+
target_link_libraries(trafficlight-qml-dynamic PUBLIC
Qt6::Core
Qt6::Gui
@@ -31,38 +28,47 @@ target_link_libraries(trafficlight-qml-dynamic PUBLIC
Qt6::Scxml
)
-
# Resources:
set_source_files_properties("../trafficlight-common/Button.qml"
PROPERTIES QT_RESOURCE_ALIAS "Button.qml"
)
+
set_source_files_properties("../trafficlight-common/Lights.ui.qml"
PROPERTIES QT_RESOURCE_ALIAS "Lights.ui.qml"
)
+
set_source_files_properties("../trafficlight-common/TrafficLight.qml"
PROPERTIES QT_RESOURCE_ALIAS "TrafficLight.qml"
)
+
set_source_files_properties("../trafficlight-common/background.png"
PROPERTIES QT_RESOURCE_ALIAS "background.png"
)
+
set_source_files_properties("../trafficlight-common/green.png"
PROPERTIES QT_RESOURCE_ALIAS "green.png"
)
+
set_source_files_properties("../trafficlight-common/pause.png"
PROPERTIES QT_RESOURCE_ALIAS "pause.png"
)
+
set_source_files_properties("../trafficlight-common/play.png"
PROPERTIES QT_RESOURCE_ALIAS "play.png"
)
+
set_source_files_properties("../trafficlight-common/red.png"
PROPERTIES QT_RESOURCE_ALIAS "red.png"
)
+
set_source_files_properties("../trafficlight-common/statemachine.scxml"
PROPERTIES QT_RESOURCE_ALIAS "statemachine.scxml"
)
+
set_source_files_properties("../trafficlight-common/yellow.png"
PROPERTIES QT_RESOURCE_ALIAS "yellow.png"
)
+
set(trafficlight-qml-dynamic_resource_files
"../trafficlight-common/Button.qml"
"../trafficlight-common/Lights.ui.qml"
diff --git a/examples/scxml/trafficlight-qml-simple/CMakeLists.txt b/examples/scxml/trafficlight-qml-simple/CMakeLists.txt
index 0ab607d..ab33256 100644
--- a/examples/scxml/trafficlight-qml-simple/CMakeLists.txt
+++ b/examples/scxml/trafficlight-qml-simple/CMakeLists.txt
@@ -1,32 +1,25 @@
-# Generated from trafficlight-qml-simple.pro.
-
cmake_minimum_required(VERSION 3.16)
project(trafficlight-qml-simple LANGUAGES CXX)
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
-
set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
+ set(INSTALL_EXAMPLESDIR "examples")
endif()
set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/scxml/trafficlight-qml-simple")
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS Qml)
-find_package(Qt6 COMPONENTS Scxml)
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Scxml)
qt_add_executable(trafficlight-qml-simple
trafficlight-qml-simple.cpp
)
+
set_target_properties(trafficlight-qml-simple PROPERTIES
WIN32_EXECUTABLE TRUE
MACOSX_BUNDLE TRUE
)
+
target_link_libraries(trafficlight-qml-simple PUBLIC
Qt::Core
Qt::Gui
@@ -34,7 +27,6 @@ target_link_libraries(trafficlight-qml-simple PUBLIC
Qt::Scxml
)
-
# Resources:
set(trafficlight-qml-simple_resource_files
"Light.qml"
@@ -48,7 +40,6 @@ qt6_add_resources(trafficlight-qml-simple "trafficlight-qml-simple"
${trafficlight-qml-simple_resource_files}
)
-
# Statecharts:
qt6_add_statecharts(trafficlight-qml-simple
../trafficlight-common/statemachine.scxml
diff --git a/examples/scxml/trafficlight-qml-static/CMakeLists.txt b/examples/scxml/trafficlight-qml-static/CMakeLists.txt
index 05c6304..20b29c5 100644
--- a/examples/scxml/trafficlight-qml-static/CMakeLists.txt
+++ b/examples/scxml/trafficlight-qml-static/CMakeLists.txt
@@ -1,29 +1,26 @@
-# Generated from trafficlight-qml-static.pro.
-
cmake_minimum_required(VERSION 3.16)
project(trafficlight-qml-static LANGUAGES CXX)
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
-
set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
+ set(INSTALL_EXAMPLESDIR "examples")
endif()
set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/scxml/trafficlight-qml-static")
-find_package(Qt6 COMPONENTS Core Gui Qml Scxml)
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Scxml)
qt_add_executable(trafficlight-qml-static
trafficlight-qml-static.cpp
)
+
set_target_properties(trafficlight-qml-static PROPERTIES
WIN32_EXECUTABLE TRUE
MACOSX_BUNDLE TRUE
)
+
target_link_libraries(trafficlight-qml-static PUBLIC
Qt6::Core
Qt6::Gui
@@ -31,35 +28,43 @@ target_link_libraries(trafficlight-qml-static PUBLIC
Qt6::Scxml
)
-
# Resources:
set_source_files_properties("../trafficlight-common/Button.qml"
PROPERTIES QT_RESOURCE_ALIAS "Button.qml"
)
+
set_source_files_properties("../trafficlight-common/Lights.ui.qml"
PROPERTIES QT_RESOURCE_ALIAS "Lights.ui.qml"
)
+
set_source_files_properties("../trafficlight-common/TrafficLight.qml"
PROPERTIES QT_RESOURCE_ALIAS "TrafficLight.qml"
)
+
set_source_files_properties("../trafficlight-common/background.png"
PROPERTIES QT_RESOURCE_ALIAS "background.png"
)
+
set_source_files_properties("../trafficlight-common/green.png"
PROPERTIES QT_RESOURCE_ALIAS "green.png"
)
+
set_source_files_properties("../trafficlight-common/pause.png"
PROPERTIES QT_RESOURCE_ALIAS "pause.png"
)
+
set_source_files_properties("../trafficlight-common/play.png"
PROPERTIES QT_RESOURCE_ALIAS "play.png"
)
+
set_source_files_properties("../trafficlight-common/red.png"
PROPERTIES QT_RESOURCE_ALIAS "red.png"
)
+
set_source_files_properties("../trafficlight-common/yellow.png"
PROPERTIES QT_RESOURCE_ALIAS "yellow.png"
)
+
set(trafficlight-qml-static_resource_files
"../trafficlight-common/Button.qml"
"../trafficlight-common/Lights.ui.qml"
@@ -80,7 +85,6 @@ qt6_add_resources(trafficlight-qml-static "trafficlight-qml-static"
${trafficlight-qml-static_resource_files}
)
-
# Statecharts:
qt6_add_statecharts(trafficlight-qml-static
../trafficlight-common/statemachine.scxml
diff --git a/examples/scxml/trafficlight-widgets-dynamic/CMakeLists.txt b/examples/scxml/trafficlight-widgets-dynamic/CMakeLists.txt
index 450c607..7b8c0a2 100644
--- a/examples/scxml/trafficlight-widgets-dynamic/CMakeLists.txt
+++ b/examples/scxml/trafficlight-widgets-dynamic/CMakeLists.txt
@@ -1,30 +1,26 @@
-# Generated from trafficlight-widgets-dynamic.pro.
-
cmake_minimum_required(VERSION 3.16)
project(trafficlight-widgets-dynamic LANGUAGES CXX)
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
-
set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
+ set(INSTALL_EXAMPLESDIR "examples")
endif()
set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/scxml/trafficlight-widgets-dynamic")
-find_package(Qt6 COMPONENTS Core Gui Widgets Scxml)
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Scxml Widgets)
qt_add_executable(trafficlight-widgets-dynamic
../trafficlight-common/trafficlight.cpp ../trafficlight-common/trafficlight.h
trafficlight-widgets-dynamic.cpp
)
+
set_target_properties(trafficlight-widgets-dynamic PROPERTIES
WIN32_EXECUTABLE TRUE
MACOSX_BUNDLE TRUE
)
+
target_link_libraries(trafficlight-widgets-dynamic PUBLIC
Qt6::Core
Qt6::Gui
@@ -32,29 +28,35 @@ target_link_libraries(trafficlight-widgets-dynamic PUBLIC
Qt6::Widgets
)
-
# Resources:
set_source_files_properties("../trafficlight-common/background.png"
PROPERTIES QT_RESOURCE_ALIAS "background.png"
)
+
set_source_files_properties("../trafficlight-common/green.png"
PROPERTIES QT_RESOURCE_ALIAS "green.png"
)
+
set_source_files_properties("../trafficlight-common/pause.png"
PROPERTIES QT_RESOURCE_ALIAS "pause.png"
)
+
set_source_files_properties("../trafficlight-common/play.png"
PROPERTIES QT_RESOURCE_ALIAS "play.png"
)
+
set_source_files_properties("../trafficlight-common/red.png"
PROPERTIES QT_RESOURCE_ALIAS "red.png"
)
+
set_source_files_properties("../trafficlight-common/statemachine.scxml"
PROPERTIES QT_RESOURCE_ALIAS "statemachine.scxml"
)
+
set_source_files_properties("../trafficlight-common/yellow.png"
PROPERTIES QT_RESOURCE_ALIAS "yellow.png"
)
+
set(trafficlight-widgets-dynamic_resource_files
"../trafficlight-common/background.png"
"../trafficlight-common/green.png"
diff --git a/examples/scxml/trafficlight-widgets-static/CMakeLists.txt b/examples/scxml/trafficlight-widgets-static/CMakeLists.txt
index 9277598..b508b82 100644
--- a/examples/scxml/trafficlight-widgets-static/CMakeLists.txt
+++ b/examples/scxml/trafficlight-widgets-static/CMakeLists.txt
@@ -1,33 +1,26 @@
-# Generated from trafficlight-widgets-static.pro.
-
cmake_minimum_required(VERSION 3.16)
project(trafficlight-widgets-static LANGUAGES CXX)
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
-
set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
+ set(INSTALL_EXAMPLESDIR "examples")
endif()
set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/scxml/trafficlight-widgets-static")
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS Widgets)
-find_package(Qt6 COMPONENTS Scxml)
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Scxml Widgets)
qt_add_executable(trafficlight-widgets-static
../trafficlight-common/trafficlight.cpp ../trafficlight-common/trafficlight.h
trafficlight-widgets-static.cpp
)
+
set_target_properties(trafficlight-widgets-static PROPERTIES
WIN32_EXECUTABLE TRUE
MACOSX_BUNDLE TRUE
)
+
target_link_libraries(trafficlight-widgets-static PUBLIC
Qt::Core
Qt::Gui
@@ -35,26 +28,31 @@ target_link_libraries(trafficlight-widgets-static PUBLIC
Qt::Widgets
)
-
# Resources:
set_source_files_properties("../trafficlight-common/background.png"
PROPERTIES QT_RESOURCE_ALIAS "background.png"
)
+
set_source_files_properties("../trafficlight-common/green.png"
PROPERTIES QT_RESOURCE_ALIAS "green.png"
)
+
set_source_files_properties("../trafficlight-common/pause.png"
PROPERTIES QT_RESOURCE_ALIAS "pause.png"
)
+
set_source_files_properties("../trafficlight-common/play.png"
PROPERTIES QT_RESOURCE_ALIAS "play.png"
)
+
set_source_files_properties("../trafficlight-common/red.png"
PROPERTIES QT_RESOURCE_ALIAS "red.png"
)
+
set_source_files_properties("../trafficlight-common/yellow.png"
PROPERTIES QT_RESOURCE_ALIAS "yellow.png"
)
+
set(trafficlight-widgets-static_resource_files
"../trafficlight-common/background.png"
"../trafficlight-common/green.png"
@@ -71,7 +69,6 @@ qt6_add_resources(trafficlight-widgets-static "trafficlight-widgets-static"
${trafficlight-widgets-static_resource_files}
)
-
# Statecharts:
qt6_add_statecharts(trafficlight-widgets-static
../trafficlight-common/statemachine.scxml
diff --git a/examples/statemachine/CMakeLists.txt b/examples/statemachine/CMakeLists.txt
index e80fa00..a8d233b 100644
--- a/examples/statemachine/CMakeLists.txt
+++ b/examples/statemachine/CMakeLists.txt
@@ -1,5 +1,3 @@
-# Generated from widgets.pro.
-
add_subdirectory(statemachine)
if(TARGET Qt::Widgets)
diff --git a/examples/statemachine/animation/CMakeLists.txt b/examples/statemachine/animation/CMakeLists.txt
index 3124521..a72abbb 100644
--- a/examples/statemachine/animation/CMakeLists.txt
+++ b/examples/statemachine/animation/CMakeLists.txt
@@ -1,5 +1,3 @@
-# Generated from animation.pro.
-
qt_internal_add_example(animatedtiles)
qt_internal_add_example(moveblocks)
qt_internal_add_example(states)
diff --git a/examples/statemachine/animation/animatedtiles/CMakeLists.txt b/examples/statemachine/animation/animatedtiles/CMakeLists.txt
index feb4a00..1e90bcf 100644
--- a/examples/statemachine/animation/animatedtiles/CMakeLists.txt
+++ b/examples/statemachine/animation/animatedtiles/CMakeLists.txt
@@ -1,32 +1,25 @@
-# Generated from animatedtiles.pro.
-
cmake_minimum_required(VERSION 3.16)
project(animatedtiles LANGUAGES CXX)
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
-
set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
+ set(INSTALL_EXAMPLESDIR "examples")
endif()
set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/animation/animatedtiles")
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS StateMachine)
-find_package(Qt6 COMPONENTS Widgets)
+find_package(Qt6 REQUIRED COMPONENTS Core Gui StateMachine Widgets)
qt_add_executable(animatedtiles
main.cpp
)
+
set_target_properties(animatedtiles PROPERTIES
WIN32_EXECUTABLE TRUE
MACOSX_BUNDLE TRUE
)
+
target_link_libraries(animatedtiles PUBLIC
Qt::Core
Qt::Gui
@@ -34,7 +27,6 @@ target_link_libraries(animatedtiles PUBLIC
Qt::Widgets
)
-
# Resources:
set(animatedtiles_resource_files
"images/Time-For-Lunch-2.jpg"
diff --git a/examples/statemachine/animation/moveblocks/CMakeLists.txt b/examples/statemachine/animation/moveblocks/CMakeLists.txt
index 7379e39..f5c0e66 100644
--- a/examples/statemachine/animation/moveblocks/CMakeLists.txt
+++ b/examples/statemachine/animation/moveblocks/CMakeLists.txt
@@ -1,32 +1,25 @@
-# Generated from moveblocks.pro.
-
cmake_minimum_required(VERSION 3.16)
project(moveblocks LANGUAGES CXX)
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
-
set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
+ set(INSTALL_EXAMPLESDIR "examples")
endif()
set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/animation/moveblocks")
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS StateMachine)
-find_package(Qt6 COMPONENTS Widgets)
+find_package(Qt6 REQUIRED COMPONENTS Core Gui StateMachine Widgets)
qt_add_executable(moveblocks
main.cpp
)
+
set_target_properties(moveblocks PROPERTIES
WIN32_EXECUTABLE TRUE
MACOSX_BUNDLE TRUE
)
+
target_link_libraries(moveblocks PUBLIC
Qt::Core
Qt::Gui
diff --git a/examples/statemachine/animation/states/CMakeLists.txt b/examples/statemachine/animation/states/CMakeLists.txt
index b02c599..55b962a 100644
--- a/examples/statemachine/animation/states/CMakeLists.txt
+++ b/examples/statemachine/animation/states/CMakeLists.txt
@@ -1,32 +1,25 @@
-# Generated from states.pro.
-
cmake_minimum_required(VERSION 3.16)
project(states LANGUAGES CXX)
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
-
set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
+ set(INSTALL_EXAMPLESDIR "examples")
endif()
set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/animation/states")
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS StateMachine)
-find_package(Qt6 COMPONENTS Widgets)
+find_package(Qt6 REQUIRED COMPONENTS Core Gui StateMachine Widgets)
qt_add_executable(states
main.cpp
)
+
set_target_properties(states PROPERTIES
WIN32_EXECUTABLE TRUE
MACOSX_BUNDLE TRUE
)
+
target_link_libraries(states PUBLIC
Qt::Core
Qt::Gui
@@ -34,7 +27,6 @@ target_link_libraries(states PUBLIC
Qt::Widgets
)
-
# Resources:
set(states_resource_files
"accessories-dictionary.png"
diff --git a/examples/statemachine/animation/stickman/CMakeLists.txt b/examples/statemachine/animation/stickman/CMakeLists.txt
index ed49e11..b2053fa 100644
--- a/examples/statemachine/animation/stickman/CMakeLists.txt
+++ b/examples/statemachine/animation/stickman/CMakeLists.txt
@@ -1,24 +1,15 @@
-# Generated from stickman.pro.
-
cmake_minimum_required(VERSION 3.16)
project(stickman LANGUAGES CXX)
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
-
set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
+ set(INSTALL_EXAMPLESDIR "examples")
endif()
set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/animation/stickman")
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS StateMachine)
-find_package(Qt6 COMPONENTS Widgets)
+find_package(Qt6 REQUIRED COMPONENTS Core Gui StateMachine Widgets)
qt_add_executable(stickman
animation.cpp animation.h
@@ -29,10 +20,12 @@ qt_add_executable(stickman
rectbutton.cpp rectbutton.h
stickman.cpp stickman.h
)
+
set_target_properties(stickman PROPERTIES
WIN32_EXECUTABLE TRUE
MACOSX_BUNDLE TRUE
)
+
target_link_libraries(stickman PUBLIC
Qt::Core
Qt::Gui
@@ -40,7 +33,6 @@ target_link_libraries(stickman PUBLIC
Qt::Widgets
)
-
# Resources:
set(stickman_resource_files
"animations/chilling.bin"
diff --git a/examples/statemachine/animation/sub-attaq/CMakeLists.txt b/examples/statemachine/animation/sub-attaq/CMakeLists.txt
index 671a43a..ee8d2a5 100644
--- a/examples/statemachine/animation/sub-attaq/CMakeLists.txt
+++ b/examples/statemachine/animation/sub-attaq/CMakeLists.txt
@@ -1,24 +1,15 @@
-# Generated from sub-attaq.pro.
-
cmake_minimum_required(VERSION 3.16)
project(sub-attaq LANGUAGES CXX)
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
-
set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
+ set(INSTALL_EXAMPLESDIR "examples")
endif()
set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/animation/sub-attaq")
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS StateMachine)
-find_package(Qt6 COMPONENTS Widgets)
+find_package(Qt6 REQUIRED COMPONENTS Core Gui StateMachine Widgets)
qt_add_executable(sub-attaq
animationmanager.cpp animationmanager.h
@@ -35,10 +26,12 @@ qt_add_executable(sub-attaq
textinformationitem.cpp textinformationitem.h
torpedo.cpp torpedo.h
)
+
set_target_properties(sub-attaq PROPERTIES
WIN32_EXECUTABLE TRUE
MACOSX_BUNDLE TRUE
)
+
target_link_libraries(sub-attaq PUBLIC
Qt::Core
Qt::Gui
@@ -46,110 +39,143 @@ target_link_libraries(sub-attaq PUBLIC
Qt::Widgets
)
-
# Resources:
set_source_files_properties("pics/big/background.png"
PROPERTIES QT_RESOURCE_ALIAS "big/background"
)
+
set_source_files_properties("pics/big/boat.png"
PROPERTIES QT_RESOURCE_ALIAS "big/boat"
)
+
set_source_files_properties("pics/big/bomb.png"
PROPERTIES QT_RESOURCE_ALIAS "big/bomb"
)
+
set_source_files_properties("pics/big/explosion/boat/step1.png"
PROPERTIES QT_RESOURCE_ALIAS "big/explosion/boat/step1"
)
+
set_source_files_properties("pics/big/explosion/boat/step2.png"
PROPERTIES QT_RESOURCE_ALIAS "big/explosion/boat/step2"
)
+
set_source_files_properties("pics/big/explosion/boat/step3.png"
PROPERTIES QT_RESOURCE_ALIAS "big/explosion/boat/step3"
)
+
set_source_files_properties("pics/big/explosion/boat/step4.png"
PROPERTIES QT_RESOURCE_ALIAS "big/explosion/boat/step4"
)
+
set_source_files_properties("pics/big/explosion/submarine/step1.png"
PROPERTIES QT_RESOURCE_ALIAS "big/explosion/submarine/step1"
)
+
set_source_files_properties("pics/big/explosion/submarine/step2.png"
PROPERTIES QT_RESOURCE_ALIAS "big/explosion/submarine/step2"
)
+
set_source_files_properties("pics/big/explosion/submarine/step3.png"
PROPERTIES QT_RESOURCE_ALIAS "big/explosion/submarine/step3"
)
+
set_source_files_properties("pics/big/explosion/submarine/step4.png"
PROPERTIES QT_RESOURCE_ALIAS "big/explosion/submarine/step4"
)
+
set_source_files_properties("pics/big/submarine.png"
PROPERTIES QT_RESOURCE_ALIAS "big/submarine"
)
+
set_source_files_properties("pics/big/surface.png"
PROPERTIES QT_RESOURCE_ALIAS "big/surface"
)
+
set_source_files_properties("pics/big/torpedo.png"
PROPERTIES QT_RESOURCE_ALIAS "big/torpedo"
)
+
set_source_files_properties("pics/scalable/boat.svg"
PROPERTIES QT_RESOURCE_ALIAS "boat"
)
+
set_source_files_properties("pics/scalable/sub-attaq.svg"
PROPERTIES QT_RESOURCE_ALIAS "all"
)
+
set_source_files_properties("pics/scalable/submarine.svg"
PROPERTIES QT_RESOURCE_ALIAS "submarine"
)
+
set_source_files_properties("pics/scalable/torpedo.svg"
PROPERTIES QT_RESOURCE_ALIAS "torpedo"
)
+
set_source_files_properties("pics/small/background.png"
PROPERTIES QT_RESOURCE_ALIAS "small/background"
)
+
set_source_files_properties("pics/small/boat.png"
PROPERTIES QT_RESOURCE_ALIAS "small/boat"
)
+
set_source_files_properties("pics/small/bomb.png"
PROPERTIES QT_RESOURCE_ALIAS "small/bomb"
)
+
set_source_files_properties("pics/small/submarine.png"
PROPERTIES QT_RESOURCE_ALIAS "small/submarine"
)
+
set_source_files_properties("pics/small/surface.png"
PROPERTIES QT_RESOURCE_ALIAS "small/surface"
)
+
set_source_files_properties("pics/small/torpedo.png"
PROPERTIES QT_RESOURCE_ALIAS "small/torpedo"
)
+
set_source_files_properties("pics/welcome/logo-a.png"
PROPERTIES QT_RESOURCE_ALIAS "logo-a"
)
+
set_source_files_properties("pics/welcome/logo-a2.png"
PROPERTIES QT_RESOURCE_ALIAS "logo-a2"
)
+
set_source_files_properties("pics/welcome/logo-b.png"
PROPERTIES QT_RESOURCE_ALIAS "logo-b"
)
+
set_source_files_properties("pics/welcome/logo-dash.png"
PROPERTIES QT_RESOURCE_ALIAS "logo-dash"
)
+
set_source_files_properties("pics/welcome/logo-excl.png"
PROPERTIES QT_RESOURCE_ALIAS "logo-excl"
)
+
set_source_files_properties("pics/welcome/logo-q.png"
PROPERTIES QT_RESOURCE_ALIAS "logo-q"
)
+
set_source_files_properties("pics/welcome/logo-s.png"
PROPERTIES QT_RESOURCE_ALIAS "logo-s"
)
+
set_source_files_properties("pics/welcome/logo-t.png"
PROPERTIES QT_RESOURCE_ALIAS "logo-t"
)
+
set_source_files_properties("pics/welcome/logo-t2.png"
PROPERTIES QT_RESOURCE_ALIAS "logo-t2"
)
+
set_source_files_properties("pics/welcome/logo-u.png"
PROPERTIES QT_RESOURCE_ALIAS "logo-u"
)
+
set(subattaq_resource_files
"data.xml"
"pics/big/background.png"
diff --git a/examples/statemachine/graphicsview/CMakeLists.txt b/examples/statemachine/graphicsview/CMakeLists.txt
index 154e02d..fa53edd 100644
--- a/examples/statemachine/graphicsview/CMakeLists.txt
+++ b/examples/statemachine/graphicsview/CMakeLists.txt
@@ -1,3 +1 @@
-# Generated from graphicsview.pro.
-
qt_internal_add_example(padnavigator)
diff --git a/examples/statemachine/graphicsview/padnavigator/CMakeLists.txt b/examples/statemachine/graphicsview/padnavigator/CMakeLists.txt
index 44721be..9aafb16 100644
--- a/examples/statemachine/graphicsview/padnavigator/CMakeLists.txt
+++ b/examples/statemachine/graphicsview/padnavigator/CMakeLists.txt
@@ -1,16 +1,11 @@
-# Generated from padnavigator.pro.
-
cmake_minimum_required(VERSION 3.16)
project(padnavigator LANGUAGES CXX)
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
-
set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
+ set(INSTALL_EXAMPLESDIR "examples")
endif()
set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/graphicsview/padnavigator")
@@ -26,10 +21,12 @@ qt_add_executable(padnavigator
roundrectitem.cpp roundrectitem.h
splashitem.cpp splashitem.h
)
+
set_target_properties(padnavigator PROPERTIES
WIN32_EXECUTABLE FALSE
MACOSX_BUNDLE TRUE
)
+
target_link_libraries(padnavigator PUBLIC
Qt::Core
Qt::Gui
@@ -37,7 +34,6 @@ target_link_libraries(padnavigator PUBLIC
Qt::Widgets
)
-
# Resources:
set(padnavigator_resource_files
"images/artsfftscope.png"
diff --git a/examples/statemachine/statemachine/CMakeLists.txt b/examples/statemachine/statemachine/CMakeLists.txt
index e0246b8..bda890e 100644
--- a/examples/statemachine/statemachine/CMakeLists.txt
+++ b/examples/statemachine/statemachine/CMakeLists.txt
@@ -1,5 +1,3 @@
-# Generated from statemachine.pro.
-
qt_internal_add_example(factorial)
qt_internal_add_example(pingpong)
if(TARGET Qt::Widgets)
diff --git a/examples/statemachine/statemachine/eventtransitions/CMakeLists.txt b/examples/statemachine/statemachine/eventtransitions/CMakeLists.txt
index ba55f84..4cef02c 100644
--- a/examples/statemachine/statemachine/eventtransitions/CMakeLists.txt
+++ b/examples/statemachine/statemachine/eventtransitions/CMakeLists.txt
@@ -1,32 +1,25 @@
-# Generated from eventtransitions.pro.
-
cmake_minimum_required(VERSION 3.16)
project(eventtransitions LANGUAGES CXX)
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
-
set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
+ set(INSTALL_EXAMPLESDIR "examples")
endif()
set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/statemachine/eventtransitions")
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS StateMachine)
-find_package(Qt6 COMPONENTS Widgets)
+find_package(Qt6 REQUIRED COMPONENTS Core Gui StateMachine Widgets)
qt_add_executable(eventtransitions
main.cpp
)
+
set_target_properties(eventtransitions PROPERTIES
WIN32_EXECUTABLE TRUE
MACOSX_BUNDLE TRUE
)
+
target_link_libraries(eventtransitions PUBLIC
Qt::Core
Qt::Gui
diff --git a/examples/statemachine/statemachine/factorial/CMakeLists.txt b/examples/statemachine/statemachine/factorial/CMakeLists.txt
index c9457b8..ffbed55 100644
--- a/examples/statemachine/statemachine/factorial/CMakeLists.txt
+++ b/examples/statemachine/statemachine/factorial/CMakeLists.txt
@@ -1,30 +1,25 @@
-# Generated from factorial.pro.
-
cmake_minimum_required(VERSION 3.16)
project(factorial LANGUAGES CXX)
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
-
set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
+ set(INSTALL_EXAMPLESDIR "examples")
endif()
set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/statemachine/factorial")
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS StateMachine)
+find_package(Qt6 REQUIRED COMPONENTS Core StateMachine)
qt_add_executable(factorial
main.cpp
)
+
set_target_properties(factorial PROPERTIES
WIN32_EXECUTABLE FALSE
MACOSX_BUNDLE FALSE
)
+
target_link_libraries(factorial PUBLIC
Qt::Core
Qt::StateMachine
diff --git a/examples/statemachine/statemachine/pingpong/CMakeLists.txt b/examples/statemachine/statemachine/pingpong/CMakeLists.txt
index 534d69e..e198e94 100644
--- a/examples/statemachine/statemachine/pingpong/CMakeLists.txt
+++ b/examples/statemachine/statemachine/pingpong/CMakeLists.txt
@@ -1,30 +1,25 @@
-# Generated from pingpong.pro.
-
cmake_minimum_required(VERSION 3.16)
project(pingpong LANGUAGES CXX)
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
-
set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
+ set(INSTALL_EXAMPLESDIR "examples")
endif()
set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/statemachine/pingpong")
-find_package(Qt6 COMPONENTS StateMachine)
-find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 REQUIRED COMPONENTS Core StateMachine)
qt_add_executable(pingpong
main.cpp
)
+
set_target_properties(pingpong PROPERTIES
WIN32_EXECUTABLE FALSE
MACOSX_BUNDLE FALSE
)
+
target_link_libraries(pingpong PUBLIC
Qt::Core
Qt::StateMachine
diff --git a/examples/statemachine/statemachine/rogue/CMakeLists.txt b/examples/statemachine/statemachine/rogue/CMakeLists.txt
index db849cc..966539c 100644
--- a/examples/statemachine/statemachine/rogue/CMakeLists.txt
+++ b/examples/statemachine/statemachine/rogue/CMakeLists.txt
@@ -1,34 +1,27 @@
-# Generated from rogue.pro.
-
cmake_minimum_required(VERSION 3.16)
project(rogue LANGUAGES CXX)
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
-
set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
+ set(INSTALL_EXAMPLESDIR "examples")
endif()
set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/statemachine/rogue")
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS StateMachine)
-find_package(Qt6 COMPONENTS Widgets)
+find_package(Qt6 REQUIRED COMPONENTS Core Gui StateMachine Widgets)
qt_add_executable(rogue
main.cpp
movementtransition.h
window.cpp window.h
)
+
set_target_properties(rogue PROPERTIES
WIN32_EXECUTABLE TRUE
MACOSX_BUNDLE TRUE
)
+
target_link_libraries(rogue PUBLIC
Qt::Core
Qt::Gui
diff --git a/examples/statemachine/statemachine/trafficlight/CMakeLists.txt b/examples/statemachine/statemachine/trafficlight/CMakeLists.txt
index 5a2d1e7..58ca7cc 100644
--- a/examples/statemachine/statemachine/trafficlight/CMakeLists.txt
+++ b/examples/statemachine/statemachine/trafficlight/CMakeLists.txt
@@ -1,32 +1,25 @@
-# Generated from trafficlight.pro.
-
cmake_minimum_required(VERSION 3.16)
project(trafficlight LANGUAGES CXX)
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
-
set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
+ set(INSTALL_EXAMPLESDIR "examples")
endif()
set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/statemachine/trafficlight")
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS StateMachine)
-find_package(Qt6 COMPONENTS Widgets)
+find_package(Qt6 REQUIRED COMPONENTS Core Gui StateMachine Widgets)
qt_add_executable(trafficlight
main.cpp
)
+
set_target_properties(trafficlight PROPERTIES
WIN32_EXECUTABLE TRUE
MACOSX_BUNDLE TRUE
)
+
target_link_libraries(trafficlight PUBLIC
Qt::Core
Qt::Gui
diff --git a/examples/statemachine/statemachine/twowaybutton/CMakeLists.txt b/examples/statemachine/statemachine/twowaybutton/CMakeLists.txt
index 0d304a0..d33a375 100644
--- a/examples/statemachine/statemachine/twowaybutton/CMakeLists.txt
+++ b/examples/statemachine/statemachine/twowaybutton/CMakeLists.txt
@@ -1,32 +1,25 @@
-# Generated from twowaybutton.pro.
-
cmake_minimum_required(VERSION 3.16)
project(twowaybutton LANGUAGES CXX)
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
-
set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
+ set(INSTALL_EXAMPLESDIR "examples")
endif()
set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/statemachine/twowaybutton")
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS StateMachine)
-find_package(Qt6 COMPONENTS Widgets)
+find_package(Qt6 REQUIRED COMPONENTS Core Gui StateMachine Widgets)
qt_add_executable(twowaybutton
main.cpp
)
+
set_target_properties(twowaybutton PROPERTIES
WIN32_EXECUTABLE TRUE
MACOSX_BUNDLE TRUE
)
+
target_link_libraries(twowaybutton PUBLIC
Qt::Core
Qt::Gui