aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick/multieffect/itemswitcher/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'examples/quick/multieffect/itemswitcher/CMakeLists.txt')
-rw-r--r--examples/quick/multieffect/itemswitcher/CMakeLists.txt36
1 files changed, 18 insertions, 18 deletions
diff --git a/examples/quick/multieffect/itemswitcher/CMakeLists.txt b/examples/quick/multieffect/itemswitcher/CMakeLists.txt
index 922b6b8023..cb2043d023 100644
--- a/examples/quick/multieffect/itemswitcher/CMakeLists.txt
+++ b/examples/quick/multieffect/itemswitcher/CMakeLists.txt
@@ -1,18 +1,12 @@
# Copyright (C) 2022 The Qt Company Ltd.
-# SPDX-License-Identifier: BSD-3-Clause
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
cmake_minimum_required(VERSION 3.16)
project(itemswitcher LANGUAGES CXX)
-if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
-endif()
-
-set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/quick/multieffect/itemswitcher")
-
find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick QuickControls2)
-qt_standard_project_setup()
+qt_standard_project_setup(REQUIRES 6.5)
add_subdirectory("../../shared" "shared")
@@ -21,11 +15,11 @@ qt_add_executable(itemswitcherexample WIN32 MACOSX_BUNDLE
)
target_link_libraries(itemswitcherexample PRIVATE
- Qt::Core
- Qt::Gui
- Qt::Qml
- Qt::Quick
- Qt::QuickControls2
+ Qt6::Core
+ Qt6::Gui
+ Qt6::Qml
+ Qt6::Quick
+ Qt6::QuickControls2
)
add_dependencies(itemswitcherexample itemswitcher_shared)
@@ -33,7 +27,6 @@ add_dependencies(itemswitcherexample itemswitcher_shared)
# Resources:
qt_add_qml_module(itemswitcherexample
URI itemswitcher
- AUTO_RESOURCE_PREFIX
QML_FILES
"qml/main.qml"
"qml/PagesView.qml"
@@ -62,9 +55,16 @@ qt_add_qml_module(itemswitcherexample
)
install(TARGETS itemswitcherexample
- RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
- BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
- LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION .
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
-bundle_shared(itemswitcherexample)
+qt_generate_deploy_qml_app_script(
+ TARGET itemswitcherexample
+ OUTPUT_SCRIPT deploy_script
+ MACOS_BUNDLE_POST_BUILD
+ NO_UNSUPPORTED_PLATFORM_ERROR
+ DEPLOY_USER_QML_MODULES_ON_UNSUPPORTED_PLATFORM
+)
+install(SCRIPT ${deploy_script})