summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAxel Spoerl <axel.spoerl@qt.io>2023-04-05 10:49:01 +0200
committerAxel Spoerl <axel.spoerl@qt.io>2023-04-06 19:36:48 +0200
commit947f4df49c0dd07d8df5660d8b19cd4f28c2531d (patch)
tree031915e2871ef25ad1ecc97ebd18856e24b4b2d8
parent5e378e73749599e53abbb55d5e5eb07a61403c0d (diff)
Fix CMakeLists.txt of echo plugin example
This patch adds a missing dependency to the echo plugin for shared builds. Since it fixes the last remaining example, it closes the Jira ticket. Fixes: QTBUG-112300 Pick-to: 6.5 Change-Id: Ib1da2d7d5f5d54d7224f1c65a995f3752037e5be Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
-rw-r--r--examples/widgets/tools/echoplugin/echowindow/CMakeLists.txt6
1 files changed, 5 insertions, 1 deletions
diff --git a/examples/widgets/tools/echoplugin/echowindow/CMakeLists.txt b/examples/widgets/tools/echoplugin/echowindow/CMakeLists.txt
index 728e6d4856..a362604018 100644
--- a/examples/widgets/tools/echoplugin/echowindow/CMakeLists.txt
+++ b/examples/widgets/tools/echoplugin/echowindow/CMakeLists.txt
@@ -18,7 +18,11 @@ target_link_libraries(echopluginwindow PRIVATE
Qt6::Widgets
)
-if(NOT QT6_IS_SHARED_LIBS_BUILD)
+if(QT6_IS_SHARED_LIBS_BUILD)
+ # Build the shared plugin too when building this example target.
+ add_dependencies(echopluginwindow echoplugin)
+else()
+ # Link the echoplugin if Qt is built statically.
target_link_libraries(echopluginwindow PRIVATE
echoplugin
)