From d221ea609fdd9f5dc99f520391beddc057373278 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kai=20K=C3=B6hne?= Date: Tue, 15 Nov 2022 22:50:53 +0100 Subject: [PATCH] Examples: Remove duplicated Qt6::PrintSupport link information MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Some CMakeLists.txt files did link to Qt6::PrintSupport twice. Also unify formatting and order of the linker step. Change-Id: I4af935c5dc3de6c243aad8511b0803ceaa872589 Reviewed-by: Jörg Bornemann --- examples/widgets/graphicsview/chip/CMakeLists.txt | 4 +--- examples/widgets/itemviews/pixelator/CMakeLists.txt | 10 ++++------ examples/widgets/itemviews/spreadsheet/CMakeLists.txt | 6 ------ .../widgets/mainwindows/dockwidgets/CMakeLists.txt | 6 ------ examples/widgets/painting/fontsampler/CMakeLists.txt | 4 +--- examples/widgets/richtext/orderform/CMakeLists.txt | 4 +--- examples/widgets/richtext/textedit/CMakeLists.txt | 6 ------ examples/widgets/touch/fingerpaint/CMakeLists.txt | 6 ------ examples/widgets/tutorials/notepad/CMakeLists.txt | 10 ++++------ examples/widgets/widgets/imageviewer/CMakeLists.txt | 6 ------ examples/widgets/widgets/scribble/CMakeLists.txt | 6 ------ 11 files changed, 11 insertions(+), 57 deletions(-) diff --git a/examples/widgets/graphicsview/chip/CMakeLists.txt b/examples/widgets/graphicsview/chip/CMakeLists.txt index b9ad27ae050..a30c60bc9e2 100644 --- a/examples/widgets/graphicsview/chip/CMakeLists.txt +++ b/examples/widgets/graphicsview/chip/CMakeLists.txt @@ -53,9 +53,7 @@ qt_add_resources(chip "images" ) if(TARGET Qt6::PrintSupport) - target_link_libraries(chip PUBLIC - Qt6::PrintSupport - ) + target_link_libraries(chip PUBLIC Qt6::PrintSupport) endif() install(TARGETS chip diff --git a/examples/widgets/itemviews/pixelator/CMakeLists.txt b/examples/widgets/itemviews/pixelator/CMakeLists.txt index 52dd6b74e57..f377791940f 100644 --- a/examples/widgets/itemviews/pixelator/CMakeLists.txt +++ b/examples/widgets/itemviews/pixelator/CMakeLists.txt @@ -35,6 +35,10 @@ target_link_libraries(pixelator PUBLIC Qt6::Widgets ) +if(TARGET Qt6::PrintSupport) + target_link_libraries(pixelator PUBLIC Qt6::PrintSupport) +endif() + # Resources: set(images_resource_files "images/qt.png" @@ -47,12 +51,6 @@ qt_add_resources(pixelator "images" ${images_resource_files} ) -if(TARGET Qt6::PrintSupport) - target_link_libraries(pixelator PUBLIC - Qt6::PrintSupport - ) -endif() - install(TARGETS pixelator RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" diff --git a/examples/widgets/itemviews/spreadsheet/CMakeLists.txt b/examples/widgets/itemviews/spreadsheet/CMakeLists.txt index 1481533dca5..94b6c26400b 100644 --- a/examples/widgets/itemviews/spreadsheet/CMakeLists.txt +++ b/examples/widgets/itemviews/spreadsheet/CMakeLists.txt @@ -52,12 +52,6 @@ qt_add_resources(spreadsheet "spreadsheet" ${spreadsheet_resource_files} ) -if(TARGET Qt6::PrintSupport) - target_link_libraries(spreadsheet PUBLIC - Qt6::PrintSupport - ) -endif() - install(TARGETS spreadsheet RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" diff --git a/examples/widgets/mainwindows/dockwidgets/CMakeLists.txt b/examples/widgets/mainwindows/dockwidgets/CMakeLists.txt index 7d9c111bf90..9f1e3bf0d69 100644 --- a/examples/widgets/mainwindows/dockwidgets/CMakeLists.txt +++ b/examples/widgets/mainwindows/dockwidgets/CMakeLists.txt @@ -52,12 +52,6 @@ qt_add_resources(dockwidgets "dockwidgets" ${dockwidgets_resource_files} ) -if(TARGET Qt6::PrintSupport) - target_link_libraries(dockwidgets PUBLIC - Qt6::PrintSupport - ) -endif() - install(TARGETS dockwidgets RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" diff --git a/examples/widgets/painting/fontsampler/CMakeLists.txt b/examples/widgets/painting/fontsampler/CMakeLists.txt index 23f2bb4c29b..c49454d2b82 100644 --- a/examples/widgets/painting/fontsampler/CMakeLists.txt +++ b/examples/widgets/painting/fontsampler/CMakeLists.txt @@ -35,9 +35,7 @@ target_link_libraries(fontsampler PUBLIC ) if(TARGET Qt6::PrintSupport) - target_link_libraries(fontsampler PUBLIC - Qt6::PrintSupport - ) + target_link_libraries(fontsampler PUBLIC Qt6::PrintSupport) endif() install(TARGETS fontsampler diff --git a/examples/widgets/richtext/orderform/CMakeLists.txt b/examples/widgets/richtext/orderform/CMakeLists.txt index 4a0d0be66b0..0306404e849 100644 --- a/examples/widgets/richtext/orderform/CMakeLists.txt +++ b/examples/widgets/richtext/orderform/CMakeLists.txt @@ -32,9 +32,7 @@ target_link_libraries(orderform PUBLIC ) if(TARGET Qt6::PrintSupport) - target_link_libraries(orderform PUBLIC - Qt6::PrintSupport - ) + target_link_libraries(orderform PUBLIC Qt6::PrintSupport) endif() install(TARGETS orderform diff --git a/examples/widgets/richtext/textedit/CMakeLists.txt b/examples/widgets/richtext/textedit/CMakeLists.txt index 020161aec7b..890f11d444b 100644 --- a/examples/widgets/richtext/textedit/CMakeLists.txt +++ b/examples/widgets/richtext/textedit/CMakeLists.txt @@ -98,12 +98,6 @@ qt_add_resources(textedit "textedit" ${textedit_resource_files} ) -if(TARGET Qt6::PrintSupport) - target_link_libraries(textedit PUBLIC - Qt6::PrintSupport - ) -endif() - install(TARGETS textedit RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" diff --git a/examples/widgets/touch/fingerpaint/CMakeLists.txt b/examples/widgets/touch/fingerpaint/CMakeLists.txt index 77467ea1aa4..b5d3b1d2650 100644 --- a/examples/widgets/touch/fingerpaint/CMakeLists.txt +++ b/examples/widgets/touch/fingerpaint/CMakeLists.txt @@ -38,12 +38,6 @@ if (TARGET Qt6::PrintSupport) target_link_libraries(fingerpaint PUBLIC Qt6::PrintSupport) endif() -if(TARGET Qt6::PrintSupport) - target_link_libraries(fingerpaint PUBLIC - Qt6::PrintSupport - ) -endif() - install(TARGETS fingerpaint RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" diff --git a/examples/widgets/tutorials/notepad/CMakeLists.txt b/examples/widgets/tutorials/notepad/CMakeLists.txt index a334176b9a6..b2a5fae402b 100644 --- a/examples/widgets/tutorials/notepad/CMakeLists.txt +++ b/examples/widgets/tutorials/notepad/CMakeLists.txt @@ -33,6 +33,10 @@ target_link_libraries(notepad PUBLIC Qt6::Widgets ) +if(TARGET Qt6::PrintSupport) + target_link_libraries(notepad PUBLIC Qt6::PrintSupport) +endif() + # Resources: set(notepad_resource_files "images/bold.png" @@ -62,12 +66,6 @@ qt_add_resources(notepad "notepad" ${notepad_resource_files} ) -if(TARGET Qt6::PrintSupport) - target_link_libraries(notepad PUBLIC - Qt6::PrintSupport - ) -endif() - install(TARGETS notepad RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" diff --git a/examples/widgets/widgets/imageviewer/CMakeLists.txt b/examples/widgets/widgets/imageviewer/CMakeLists.txt index 00e78fcdd59..a3f01c12601 100644 --- a/examples/widgets/widgets/imageviewer/CMakeLists.txt +++ b/examples/widgets/widgets/imageviewer/CMakeLists.txt @@ -37,12 +37,6 @@ if (TARGET Qt6::PrintSupport) target_link_libraries(imageviewer PUBLIC Qt6::PrintSupport) endif() -if(TARGET Qt6::PrintSupport) - target_link_libraries(imageviewer PUBLIC - Qt6::PrintSupport - ) -endif() - install(TARGETS imageviewer RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" diff --git a/examples/widgets/widgets/scribble/CMakeLists.txt b/examples/widgets/widgets/scribble/CMakeLists.txt index 506c2a3b7c5..c530cd1cb26 100644 --- a/examples/widgets/widgets/scribble/CMakeLists.txt +++ b/examples/widgets/widgets/scribble/CMakeLists.txt @@ -38,12 +38,6 @@ if (TARGET Qt6::PrintSupport) target_link_libraries(scribble PUBLIC Qt6::PrintSupport) endif() -if(TARGET Qt6::PrintSupport) - target_link_libraries(scribble PUBLIC - Qt6::PrintSupport - ) -endif() - install(TARGETS scribble RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"