From 947f4df49c0dd07d8df5660d8b19cd4f28c2531d Mon Sep 17 00:00:00 2001 From: Axel Spoerl Date: Wed, 5 Apr 2023 10:49:01 +0200 Subject: [PATCH] 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 --- examples/widgets/tools/echoplugin/echowindow/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 )