diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2023-01-31 15:05:45 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2023-01-31 21:38:01 +0000 |
commit | 4ebb4052b2e4fc1a3371c4e2557883ce1d09926f (patch) | |
tree | e9360ebdccb1c5b4062b8fad260e1a6099faf9dc | |
parent | 6933564169660916054fefa21bb01c2e823102de (diff) | |
download | qttools-4ebb4052b2e4fc1a3371c4e2557883ce1d09926f.tar.gz |
Qt Designer: Fix install of plugin examples
Task-number: QTBUG-110447
Change-Id: I1b243a6a564ea18d684a8d5fa8d3310facf81f7d
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 81fdb4dee5083a59dbdb2d01fcb6ab13285be26b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
4 files changed, 36 insertions, 24 deletions
diff --git a/examples/designer/containerextension/CMakeLists.txt b/examples/designer/containerextension/CMakeLists.txt index 545d83ccf..be1767b87 100644 --- a/examples/designer/containerextension/CMakeLists.txt +++ b/examples/designer/containerextension/CMakeLists.txt @@ -6,12 +6,6 @@ project(containerextension LANGUAGES CXX) set(CMAKE_AUTOMOC ON) -if(NOT DEFINED INSTALL_EXAMPLESDIR) - set(INSTALL_EXAMPLESDIR "examples") -endif() - -set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/plugins/designer") - find_package(Qt6 REQUIRED COMPONENTS Core Designer Gui Widgets) qt_add_plugin(containerextension) @@ -34,6 +28,15 @@ target_link_libraries(containerextension PUBLIC Qt::Widgets ) +if(QT6_INSTALL_PREFIX) + set(INSTALL_EXAMPLEDIR "${QT6_INSTALL_PREFIX}/${QT6_INSTALL_PLUGINS}/designer") +else() + if(NOT DEFINED INSTALL_EXAMPLESDIR) + set(INSTALL_EXAMPLESDIR "examples") + endif() + set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/plugins/designer") +endif() + install(TARGETS containerextension RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" diff --git a/examples/designer/customwidgetplugin/CMakeLists.txt b/examples/designer/customwidgetplugin/CMakeLists.txt index 4f3adaa14..3878a9a78 100644 --- a/examples/designer/customwidgetplugin/CMakeLists.txt +++ b/examples/designer/customwidgetplugin/CMakeLists.txt @@ -6,12 +6,6 @@ project(customwidgetplugin LANGUAGES CXX) set(CMAKE_AUTOMOC ON) -if(NOT DEFINED INSTALL_EXAMPLESDIR) - set(INSTALL_EXAMPLESDIR "examples") -endif() - -set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/plugins/designer") - find_package(Qt6 REQUIRED COMPONENTS Core Gui UiPlugin Widgets) qt_add_plugin(customwidgetplugin) @@ -32,6 +26,15 @@ target_link_libraries(customwidgetplugin PUBLIC Qt::Widgets ) +if(QT6_INSTALL_PREFIX) + set(INSTALL_EXAMPLEDIR "${QT6_INSTALL_PREFIX}/${QT6_INSTALL_PLUGINS}/designer") +else() + if(NOT DEFINED INSTALL_EXAMPLESDIR) + set(INSTALL_EXAMPLESDIR "examples") + endif() + set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/plugins/designer") +endif() + install(TARGETS customwidgetplugin RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" diff --git a/examples/designer/taskmenuextension/CMakeLists.txt b/examples/designer/taskmenuextension/CMakeLists.txt index 98996eada..a0dcaf373 100644 --- a/examples/designer/taskmenuextension/CMakeLists.txt +++ b/examples/designer/taskmenuextension/CMakeLists.txt @@ -6,12 +6,6 @@ project(taskmenuextension LANGUAGES CXX) set(CMAKE_AUTOMOC ON) -if(NOT DEFINED INSTALL_EXAMPLESDIR) - set(INSTALL_EXAMPLESDIR "examples") -endif() - -set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/plugins/designer") - find_package(Qt6 REQUIRED COMPONENTS Core Designer Gui Widgets) qt_add_plugin(taskmenuextension) @@ -34,6 +28,15 @@ target_link_libraries(taskmenuextension PUBLIC Qt::Widgets ) +if(QT6_INSTALL_PREFIX) + set(INSTALL_EXAMPLEDIR "${QT6_INSTALL_PREFIX}/${QT6_INSTALL_PLUGINS}/designer") +else() + if(NOT DEFINED INSTALL_EXAMPLESDIR) + set(INSTALL_EXAMPLESDIR "examples") + endif() + set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/plugins/designer") +endif() + install(TARGETS taskmenuextension RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" diff --git a/examples/designer/worldtimeclockplugin/CMakeLists.txt b/examples/designer/worldtimeclockplugin/CMakeLists.txt index bdd85fc1b..30d9bc0a0 100644 --- a/examples/designer/worldtimeclockplugin/CMakeLists.txt +++ b/examples/designer/worldtimeclockplugin/CMakeLists.txt @@ -6,12 +6,6 @@ project(worldtimeclockplugin LANGUAGES CXX) set(CMAKE_AUTOMOC ON) -if(NOT DEFINED INSTALL_EXAMPLESDIR) - set(INSTALL_EXAMPLESDIR "examples") -endif() - -set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/plugins/designer") - find_package(Qt6 REQUIRED COMPONENTS Core Gui UiPlugin Widgets) qt_add_plugin(worldtimeclockplugin) @@ -32,6 +26,15 @@ target_link_libraries(worldtimeclockplugin PUBLIC Qt::Widgets ) +if(QT6_INSTALL_PREFIX) + set(INSTALL_EXAMPLEDIR "${QT6_INSTALL_PREFIX}/${QT6_INSTALL_PLUGINS}/designer") +else() + if(NOT DEFINED INSTALL_EXAMPLESDIR) + set(INSTALL_EXAMPLESDIR "examples") + endif() + set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/plugins/designer") +endif() + install(TARGETS worldtimeclockplugin RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" |