diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2023-01-31 15:05:45 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2023-01-31 16:07:06 +0100 |
commit | 81fdb4dee5083a59dbdb2d01fcb6ab13285be26b (patch) | |
tree | 67b8e813911fd530ee4909334db041cf53349b81 | |
parent | 8e047fe8cde91454623847ddc1c2abd164d63891 (diff) | |
download | qttools-81fdb4dee5083a59dbdb2d01fcb6ab13285be26b.tar.gz |
Qt Designer: Fix install of plugin examples
Pick-to: 6.5 6.4
Task-number: QTBUG-110447
Change-Id: I1b243a6a564ea18d684a8d5fa8d3310facf81f7d
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
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}" |