summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/designer/containerextension/CMakeLists.txt15
-rw-r--r--examples/designer/customwidgetplugin/CMakeLists.txt15
-rw-r--r--examples/designer/taskmenuextension/CMakeLists.txt15
-rw-r--r--examples/designer/worldtimeclockplugin/CMakeLists.txt15
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}"