aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick/itemvariablerefreshrate/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'examples/quick/itemvariablerefreshrate/CMakeLists.txt')
-rw-r--r--examples/quick/itemvariablerefreshrate/CMakeLists.txt32
1 files changed, 17 insertions, 15 deletions
diff --git a/examples/quick/itemvariablerefreshrate/CMakeLists.txt b/examples/quick/itemvariablerefreshrate/CMakeLists.txt
index a08fc01aca..ca65a005e1 100644
--- a/examples/quick/itemvariablerefreshrate/CMakeLists.txt
+++ b/examples/quick/itemvariablerefreshrate/CMakeLists.txt
@@ -4,15 +4,9 @@
cmake_minimum_required(VERSION 3.16)
project(itemvariablerefreshrate LANGUAGES CXX)
-if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
-endif()
-
-set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/quick/itemvariablerefreshrate")
-
find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick)
-qt_standard_project_setup()
+qt_standard_project_setup(REQUIRES 6.5)
qt_add_executable(itemvariablerefreshrateexample
WIN32
@@ -21,15 +15,14 @@ qt_add_executable(itemvariablerefreshrateexample
)
target_link_libraries(itemvariablerefreshrateexample PRIVATE
- Qt::Core
- Qt::Gui
- Qt::Qml
- Qt::Quick
+ Qt6::Core
+ Qt6::Gui
+ Qt6::Qml
+ Qt6::Quick
)
qt_add_qml_module(itemvariablerefreshrateexample
URI itemvariablerefreshrate
- AUTO_RESOURCE_PREFIX
QML_FILES
"itemvariablerefreshrate.qml"
RESOURCES
@@ -37,7 +30,16 @@ qt_add_qml_module(itemvariablerefreshrateexample
)
install(TARGETS itemvariablerefreshrateexample
- RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
- BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
- LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION .
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+)
+
+qt_generate_deploy_qml_app_script(
+ TARGET itemvariablerefreshrateexample
+ OUTPUT_SCRIPT deploy_script
+ MACOS_BUNDLE_POST_BUILD
+ NO_UNSUPPORTED_PLATFORM_ERROR
+ DEPLOY_USER_QML_MODULES_ON_UNSUPPORTED_PLATFORM
)
+install(SCRIPT ${deploy_script})