diff options
author | Juha Vuolle <juha.vuolle@qt.io> | 2023-02-23 18:25:27 +0200 |
---|---|---|
committer | Juha Vuolle <juha.vuolle@qt.io> | 2023-03-10 13:30:05 +0200 |
commit | f00f576c95fc99e9bfebdb5d6e321360db1b7eef (patch) | |
tree | 0787858fb97aba553109aa6a08aa4642e95b16ab /examples/statemachine/trafficlight/CMakeLists.txt | |
parent | 236d927705defbf58a6b410befcf73a141d06c4e (diff) |
Flatten the state machine example directory structure
The split into "animation" "graphicsview" and "statemachine"
sub-directories is a reminiscent of the times when the examples were
in qtcore, and as such not very meaningful when state machine is
in a separate repository. In addition remove similarly inherited
READMEs.
Pick-to: 6.5.0 6.5
Task-number: QTBUG-111447
Change-Id: I8f3d977512fdc239bf3dede341f69788df0a09f4
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'examples/statemachine/trafficlight/CMakeLists.txt')
-rw-r--r-- | examples/statemachine/trafficlight/CMakeLists.txt | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/examples/statemachine/trafficlight/CMakeLists.txt b/examples/statemachine/trafficlight/CMakeLists.txt new file mode 100644 index 0000000..e566324 --- /dev/null +++ b/examples/statemachine/trafficlight/CMakeLists.txt @@ -0,0 +1,37 @@ +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause + +cmake_minimum_required(VERSION 3.16) +project(trafficlight LANGUAGES CXX) + +set(CMAKE_AUTOMOC ON) + +if(NOT DEFINED INSTALL_EXAMPLESDIR) + set(INSTALL_EXAMPLESDIR "examples") +endif() + +set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/statemachine/trafficlight") + +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 + Qt::StateMachine + Qt::Widgets +) + +install(TARGETS trafficlight + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) |