diff options
author | Juha Vuolle <juha.vuolle@qt.io> | 2023-03-10 15:19:09 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2023-03-18 17:08:54 +0000 |
commit | b6311c7cbcfdbc34d2bcf86d2f7ec18195b6b297 (patch) | |
tree | 9169965c238aed5a9e3fa75aa533cbc3245cb04b /examples/scxml/trafficlight-widgets-dynamic/CMakeLists.txt | |
parent | e94e68167b4cd5776e67250559b8c2301e34b862 (diff) |
Revamp scxml trafficlight examples
In addition to general modernization, this commit changes
the trafficlight structure slightly so that the qml-static
and qml-dynamic variants have their own copies of the QML
files.
This way the examples remain standalone examples
whilst using the contemporary qt_add_qml_module, without
needing to introduce a shared common QML module. A shared
common QML module is a viable option but would unnecesarily
complicate example build/link/deployments.
Task-number: QTBUG-111323
Change-Id: I7a289db2d2927d97438556362e4b2eff53821020
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit 3314da2f16d2b0c1f52e8da07c299ee983314c59)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'examples/scxml/trafficlight-widgets-dynamic/CMakeLists.txt')
-rw-r--r-- | examples/scxml/trafficlight-widgets-dynamic/CMakeLists.txt | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/scxml/trafficlight-widgets-dynamic/CMakeLists.txt b/examples/scxml/trafficlight-widgets-dynamic/CMakeLists.txt index a97ad83..0215c76 100644 --- a/examples/scxml/trafficlight-widgets-dynamic/CMakeLists.txt +++ b/examples/scxml/trafficlight-widgets-dynamic/CMakeLists.txt @@ -1,11 +1,9 @@ -# Copyright (C) 2022 The Qt Company Ltd. +# Copyright (C) 2023 The Qt Company Ltd. # SPDX-License-Identifier: BSD-3-Clause cmake_minimum_required(VERSION 3.16) project(trafficlight-widgets-dynamic LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/scxml/trafficlight-widgets-dynami find_package(Qt6 REQUIRED COMPONENTS Core Gui Scxml Widgets) +qt_standard_project_setup() + qt_add_executable(trafficlight-widgets-dynamic ../trafficlight-common/trafficlight.cpp ../trafficlight-common/trafficlight.h trafficlight-widgets-dynamic.cpp @@ -24,7 +24,7 @@ set_target_properties(trafficlight-widgets-dynamic PROPERTIES MACOSX_BUNDLE TRUE ) -target_link_libraries(trafficlight-widgets-dynamic PUBLIC +target_link_libraries(trafficlight-widgets-dynamic PRIVATE Qt6::Core Qt6::Gui Qt6::Scxml |