aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick/imageelements/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'examples/quick/imageelements/CMakeLists.txt')
-rw-r--r--examples/quick/imageelements/CMakeLists.txt21
1 files changed, 11 insertions, 10 deletions
diff --git a/examples/quick/imageelements/CMakeLists.txt b/examples/quick/imageelements/CMakeLists.txt
index 128188d084..e13f57af9b 100644
--- a/examples/quick/imageelements/CMakeLists.txt
+++ b/examples/quick/imageelements/CMakeLists.txt
@@ -4,12 +4,6 @@
cmake_minimum_required(VERSION 3.16)
project(imageelements LANGUAGES CXX)
-if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
-endif()
-
-set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/quick/imageelements")
-
find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick)
qt_standard_project_setup(REQUIRES 6.5)
@@ -60,9 +54,16 @@ qt_add_qml_module(imageelementsexample
)
install(TARGETS imageelementsexample
- 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(imageelementsexample)
+qt_generate_deploy_qml_app_script(
+ TARGET imageelementsexample
+ OUTPUT_SCRIPT deploy_script
+ MACOS_BUNDLE_POST_BUILD
+ NO_UNSUPPORTED_PLATFORM_ERROR
+ DEPLOY_USER_QML_MODULES_ON_UNSUPPORTED_PLATFORM
+)
+install(SCRIPT ${deploy_script})