diff options
author | Joerg Bornemann <joerg.bornemann@qt.io> | 2019-09-17 14:12:29 +0200 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@qt.io> | 2019-09-26 19:39:39 +0000 |
commit | 5fe75751ed90354eb0968f528974592003c65460 (patch) | |
tree | 34289c653ea7f8c0d891aee0ca6a4be1427bc04d /examples/scxml/invoke-static | |
parent | b5daa31da99fbe872b4df047f37da17ae2c119c9 (diff) |
Port QtScxml to CMake
Change-Id: I227f18b6a9825b6974eab6ba9feaf62bd0934133
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'examples/scxml/invoke-static')
-rw-r--r-- | examples/scxml/invoke-static/CMakeLists.txt | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/examples/scxml/invoke-static/CMakeLists.txt b/examples/scxml/invoke-static/CMakeLists.txt new file mode 100644 index 0000000..f98abe3 --- /dev/null +++ b/examples/scxml/invoke-static/CMakeLists.txt @@ -0,0 +1,63 @@ +# Generated from invoke-static.pro. + +cmake_minimum_required(VERSION 3.14) +project(invoke-static LANGUAGES CXX) + +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) + +set(INSTALL_EXAMPLEDIR "examples") + +find_package(Qt6 COMPONENTS Core) +find_package(Qt6 COMPONENTS Gui) +find_package(Qt6 COMPONENTS Qml) +find_package(Qt6 COMPONENTS Scxml) + +add_qt_gui_executable(invoke-static + invoke-static.cpp +) +target_link_libraries(invoke-static PUBLIC + Qt::Core + Qt::Gui + Qt::Qml + Qt::Scxml +) + +# Resources: +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" + "../invoke-common/SubView.qml" + "invoke-static.qml" +) + +qt6_add_resources(invoke-static "invoke-static" + PREFIX + "/" + FILES + ${invoke-static_resource_files} +) + + +# Statecharts: +qt6_add_statecharts(invoke-static + ../invoke-common/statemachine.scxml +) + +install(TARGETS invoke-static + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) |