aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quickcontrols/attachedstyleproperties/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'examples/quickcontrols/attachedstyleproperties/CMakeLists.txt')
-rw-r--r--examples/quickcontrols/attachedstyleproperties/CMakeLists.txt38
1 files changed, 17 insertions, 21 deletions
diff --git a/examples/quickcontrols/attachedstyleproperties/CMakeLists.txt b/examples/quickcontrols/attachedstyleproperties/CMakeLists.txt
index 4228052a26..0e4f2778fa 100644
--- a/examples/quickcontrols/attachedstyleproperties/CMakeLists.txt
+++ b/examples/quickcontrols/attachedstyleproperties/CMakeLists.txt
@@ -3,14 +3,9 @@ project(attachedstyleproperties LANGUAGES CXX)
set(CMAKE_AUTOMOC ON)
-if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
-endif()
-
-set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/quickcontrols/attachedstyleproperties")
-
find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml QuickControls2)
-qt_standard_project_setup()
+
+qt_standard_project_setup(REQUIRES 6.5)
add_subdirectory(MyStyle)
@@ -28,24 +23,25 @@ qt_add_qml_module(attachedstylepropertiesexample
)
target_link_libraries(attachedstylepropertiesexample PRIVATE
- Qt::Core
- Qt::Gui
- Qt::Qml
- Qt::QuickControls2
+ Qt6::Core
+ Qt6::Gui
+ Qt6::Qml
+ Qt6::QuickControls2
)
add_dependencies(attachedstylepropertiesexample MyStyle)
install(TARGETS attachedstylepropertiesexample
- RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
- BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
- LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION .
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
-include(../../quick/shared/QtBundleQmlModuleForMacOS.cmake)
-
-set(app_target "attachedstylepropertiesexample")
-set(qml_plugin_target "MyStyleplugin")
-set(qml_module_uri "MyStyle")
-add_qml_module_to_macos_app_bundle(
- "${app_target}" "${qml_plugin_target}" "${qml_module_uri}")
+qt_generate_deploy_qml_app_script(
+ TARGET attachedstylepropertiesexample
+ OUTPUT_SCRIPT deploy_script
+ MACOS_BUNDLE_POST_BUILD
+ NO_UNSUPPORTED_PLATFORM_ERROR
+ DEPLOY_USER_QML_MODULES_ON_UNSUPPORTED_PLATFORM
+)
+install(SCRIPT ${deploy_script})