summaryrefslogtreecommitdiffstats
path: root/examples/widgets/tools
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2023-03-27 15:06:42 +0200
committerJoerg Bornemann <joerg.bornemann@qt.io>2023-03-28 10:45:55 +0200
commit454b1de22c77b7c4917dfa9d6182b4ea80b49dc5 (patch)
tree74476f37bd3509e1260a950da0749d859ff1512e /examples/widgets/tools
parent502a7706b94380d4957a7e594fc7c4c4db8ae81b (diff)
CMake: build the shared plugin when building the plugandpaint target
People expect that building the "main target" of an example builds all necessary subtargets as well. Add a dependency from plugandpaint to pnp_extrafilters. Pick-to: 6.5 Task-number: QTBUG-112300 Change-Id: I036beb961fe474ff060f93c98f5e2bda58e66f71 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Diffstat (limited to 'examples/widgets/tools')
-rw-r--r--examples/widgets/tools/plugandpaint/app/CMakeLists.txt6
1 files changed, 5 insertions, 1 deletions
diff --git a/examples/widgets/tools/plugandpaint/app/CMakeLists.txt b/examples/widgets/tools/plugandpaint/app/CMakeLists.txt
index 5ab3171284..c0368e7ba2 100644
--- a/examples/widgets/tools/plugandpaint/app/CMakeLists.txt
+++ b/examples/widgets/tools/plugandpaint/app/CMakeLists.txt
@@ -19,7 +19,11 @@ target_link_libraries(plugandpaint PRIVATE
pnp_basictools
)
-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(plugandpaint pnp_extrafilters)
+else()
+ # Link the extrafilters plugin if Qt is built statically.
target_link_libraries(plugandpaint PRIVATE
pnp_extrafilters
)