diff options
Diffstat (limited to 'examples/quick/text/CMakeLists.txt')
-rw-r--r-- | examples/quick/text/CMakeLists.txt | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/examples/quick/text/CMakeLists.txt b/examples/quick/text/CMakeLists.txt index 8d60ac77c4..5560256793 100644 --- a/examples/quick/text/CMakeLists.txt +++ b/examples/quick/text/CMakeLists.txt @@ -4,12 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(text LANGUAGES CXX) -if(NOT DEFINED INSTALL_EXAMPLESDIR) - set(INSTALL_EXAMPLESDIR "examples") -endif() - -set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/quick/text") - find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick) qt_standard_project_setup(REQUIRES 6.5) @@ -53,9 +47,16 @@ qt_add_qml_module(textexample ) install(TARGETS textexample - 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(textexample) +qt_generate_deploy_qml_app_script( + TARGET textexample + OUTPUT_SCRIPT deploy_script + MACOS_BUNDLE_POST_BUILD + NO_UNSUPPORTED_PLATFORM_ERROR + DEPLOY_USER_QML_MODULES_ON_UNSUPPORTED_PLATFORM +) +install(SCRIPT ${deploy_script}) |