summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKai Köhne <kai.koehne@qt.io>2022-11-15 22:50:53 +0100
committerKai Köhne <kai.koehne@qt.io>2022-11-30 14:48:50 +0100
commitd221ea609fdd9f5dc99f520391beddc057373278 (patch)
tree5e0aa39ba1807b226f11c17b9b7607182ede055d
parentde7287be69b449b1da13148e62fbeef0406eb792 (diff)
Examples: Remove duplicated Qt6::PrintSupport link information
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 <joerg.bornemann@qt.io>
-rw-r--r--examples/widgets/graphicsview/chip/CMakeLists.txt4
-rw-r--r--examples/widgets/itemviews/pixelator/CMakeLists.txt10
-rw-r--r--examples/widgets/itemviews/spreadsheet/CMakeLists.txt6
-rw-r--r--examples/widgets/mainwindows/dockwidgets/CMakeLists.txt6
-rw-r--r--examples/widgets/painting/fontsampler/CMakeLists.txt4
-rw-r--r--examples/widgets/richtext/orderform/CMakeLists.txt4
-rw-r--r--examples/widgets/richtext/textedit/CMakeLists.txt6
-rw-r--r--examples/widgets/touch/fingerpaint/CMakeLists.txt6
-rw-r--r--examples/widgets/tutorials/notepad/CMakeLists.txt10
-rw-r--r--examples/widgets/widgets/imageviewer/CMakeLists.txt6
-rw-r--r--examples/widgets/widgets/scribble/CMakeLists.txt6
11 files changed, 11 insertions, 57 deletions
diff --git a/examples/widgets/graphicsview/chip/CMakeLists.txt b/examples/widgets/graphicsview/chip/CMakeLists.txt
index b9ad27ae05..a30c60bc9e 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 52dd6b74e5..f377791940 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 1481533dca..94b6c26400 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 7d9c111bf9..9f1e3bf0d6 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 23f2bb4c29..c49454d2b8 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 4a0d0be66b..0306404e84 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 020161aec7..890f11d444 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 77467ea1aa..b5d3b1d265 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 a334176b9a..b2a5fae402 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 00e78fcdd5..a3f01c1260 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 506c2a3b7c..c530cd1cb2 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}"