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