summaryrefslogtreecommitdiffstats
path: root/examples/widgets/tools
diff options
context:
space:
mode:
authorKai Köhne <kai.koehne@qt.io>2021-12-08 17:25:35 +0100
committerKai Koehne <kai.koehne@qt.io>2021-12-13 14:16:26 +0000
commit80a76df1784a135fa1d86ac88f8c4d2dc6bf8c35 (patch)
tree5928602422ca953e6bbbdc51e72d0d3c68568b0d /examples/widgets/tools
parent51f22a3a0495d8418a5d6dd0f09771c0347441b9 (diff)
Examples: Fix whitespace issues in CMakeLists.txt
Pick-to: 6.3 Change-Id: I8e6dd1f250f8be6016ee4164cb2ab7034cbb1203 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'examples/widgets/tools')
-rw-r--r--examples/widgets/tools/completer/CMakeLists.txt5
-rw-r--r--examples/widgets/tools/customcompleter/CMakeLists.txt5
-rw-r--r--examples/widgets/tools/echoplugin/echowindow/CMakeLists.txt2
-rw-r--r--examples/widgets/tools/echoplugin/plugin/CMakeLists.txt3
-rw-r--r--examples/widgets/tools/i18n/CMakeLists.txt5
-rw-r--r--examples/widgets/tools/plugandpaint/app/CMakeLists.txt2
-rw-r--r--examples/widgets/tools/plugandpaint/plugins/basictools/CMakeLists.txt2
-rw-r--r--examples/widgets/tools/plugandpaint/plugins/extrafilters/CMakeLists.txt3
-rw-r--r--examples/widgets/tools/regularexpression/CMakeLists.txt5
-rw-r--r--examples/widgets/tools/settingseditor/CMakeLists.txt4
-rw-r--r--examples/widgets/tools/styleplugin/plugin/CMakeLists.txt3
-rw-r--r--examples/widgets/tools/styleplugin/stylewindow/CMakeLists.txt3
-rw-r--r--examples/widgets/tools/treemodelcompleter/CMakeLists.txt5
-rw-r--r--examples/widgets/tools/undo/CMakeLists.txt5
-rw-r--r--examples/widgets/tools/undoframework/CMakeLists.txt5
15 files changed, 42 insertions, 15 deletions
diff --git a/examples/widgets/tools/completer/CMakeLists.txt b/examples/widgets/tools/completer/CMakeLists.txt
index 8ec960dafd..21cd750de8 100644
--- a/examples/widgets/tools/completer/CMakeLists.txt
+++ b/examples/widgets/tools/completer/CMakeLists.txt
@@ -8,7 +8,7 @@ set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
+ set(INSTALL_EXAMPLESDIR "examples")
endif()
set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tools/completer")
@@ -20,17 +20,18 @@ qt_add_executable(completer
main.cpp
mainwindow.cpp mainwindow.h
)
+
set_target_properties(completer PROPERTIES
WIN32_EXECUTABLE TRUE
MACOSX_BUNDLE TRUE
)
+
target_link_libraries(completer PUBLIC
Qt::Core
Qt::Gui
Qt::Widgets
)
-
# Resources:
set(completer_resource_files
"resources/countries.txt"
diff --git a/examples/widgets/tools/customcompleter/CMakeLists.txt b/examples/widgets/tools/customcompleter/CMakeLists.txt
index 9e0bbee241..558262f948 100644
--- a/examples/widgets/tools/customcompleter/CMakeLists.txt
+++ b/examples/widgets/tools/customcompleter/CMakeLists.txt
@@ -8,7 +8,7 @@ set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
+ set(INSTALL_EXAMPLESDIR "examples")
endif()
set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tools/customcompleter")
@@ -20,17 +20,18 @@ qt_add_executable(customcompleter
mainwindow.cpp mainwindow.h
textedit.cpp textedit.h
)
+
set_target_properties(customcompleter PROPERTIES
WIN32_EXECUTABLE TRUE
MACOSX_BUNDLE TRUE
)
+
target_link_libraries(customcompleter PUBLIC
Qt::Core
Qt::Gui
Qt::Widgets
)
-
# Resources:
set(customcompleter_resource_files
"resources/wordlist.txt"
diff --git a/examples/widgets/tools/echoplugin/echowindow/CMakeLists.txt b/examples/widgets/tools/echoplugin/echowindow/CMakeLists.txt
index 3fcbe17172..29183a7c1f 100644
--- a/examples/widgets/tools/echoplugin/echowindow/CMakeLists.txt
+++ b/examples/widgets/tools/echoplugin/echowindow/CMakeLists.txt
@@ -3,10 +3,12 @@ qt_add_executable(echopluginwindow
echowindow.cpp echowindow.h
main.cpp
)
+
set_target_properties(echopluginwindow PROPERTIES
WIN32_EXECUTABLE TRUE
MACOSX_BUNDLE TRUE
)
+
target_link_libraries(echopluginwindow PRIVATE
Qt::Core
Qt::Gui
diff --git a/examples/widgets/tools/echoplugin/plugin/CMakeLists.txt b/examples/widgets/tools/echoplugin/plugin/CMakeLists.txt
index fb727aa1d7..7d63180a87 100644
--- a/examples/widgets/tools/echoplugin/plugin/CMakeLists.txt
+++ b/examples/widgets/tools/echoplugin/plugin/CMakeLists.txt
@@ -1,12 +1,15 @@
qt_add_plugin(echoplugin
CLASS_NAME EchoPlugin
)
+
target_sources(echoplugin PRIVATE
echoplugin.cpp echoplugin.h
)
+
set_target_properties(echoplugin PROPERTIES
LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/echowindow"
)
+
target_include_directories(echoplugin PUBLIC
../echowindow
)
diff --git a/examples/widgets/tools/i18n/CMakeLists.txt b/examples/widgets/tools/i18n/CMakeLists.txt
index 0cb230a805..362fa96c8f 100644
--- a/examples/widgets/tools/i18n/CMakeLists.txt
+++ b/examples/widgets/tools/i18n/CMakeLists.txt
@@ -8,7 +8,7 @@ set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
+ set(INSTALL_EXAMPLESDIR "examples")
endif()
set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tools/i18n")
@@ -20,17 +20,18 @@ qt_add_executable(i18n
main.cpp
mainwindow.cpp mainwindow.h
)
+
set_target_properties(i18n PROPERTIES
WIN32_EXECUTABLE TRUE
MACOSX_BUNDLE TRUE
)
+
target_link_libraries(i18n PUBLIC
Qt::Core
Qt::Gui
Qt::Widgets
)
-
# Resources:
set(i18n_resource_files
"translations/i18n_ar.qm"
diff --git a/examples/widgets/tools/plugandpaint/app/CMakeLists.txt b/examples/widgets/tools/plugandpaint/app/CMakeLists.txt
index 3e46331f81..f2b5b4937f 100644
--- a/examples/widgets/tools/plugandpaint/app/CMakeLists.txt
+++ b/examples/widgets/tools/plugandpaint/app/CMakeLists.txt
@@ -5,10 +5,12 @@ qt_add_executable(plugandpaint
paintarea.cpp paintarea.h
plugindialog.cpp plugindialog.h
)
+
set_target_properties(plugandpaint PROPERTIES
WIN32_EXECUTABLE TRUE
MACOSX_BUNDLE TRUE
)
+
target_link_libraries(plugandpaint PRIVATE
Qt::Widgets
pnp_basictools
diff --git a/examples/widgets/tools/plugandpaint/plugins/basictools/CMakeLists.txt b/examples/widgets/tools/plugandpaint/plugins/basictools/CMakeLists.txt
index 0056205319..638bb53ef6 100644
--- a/examples/widgets/tools/plugandpaint/plugins/basictools/CMakeLists.txt
+++ b/examples/widgets/tools/plugandpaint/plugins/basictools/CMakeLists.txt
@@ -2,9 +2,11 @@ qt_add_plugin(pnp_basictools
STATIC
CLASS_NAME BasicToolsPlugin
)
+
target_sources(pnp_basictools PRIVATE
basictoolsplugin.cpp basictoolsplugin.h
)
+
target_include_directories(pnp_basictools PUBLIC
../../app
)
diff --git a/examples/widgets/tools/plugandpaint/plugins/extrafilters/CMakeLists.txt b/examples/widgets/tools/plugandpaint/plugins/extrafilters/CMakeLists.txt
index 2332f84399..4a3dd45de9 100644
--- a/examples/widgets/tools/plugandpaint/plugins/extrafilters/CMakeLists.txt
+++ b/examples/widgets/tools/plugandpaint/plugins/extrafilters/CMakeLists.txt
@@ -1,12 +1,15 @@
qt_add_plugin(pnp_extrafilters
CLASS_NAME ExtraFiltersPlugin
)
+
target_sources(pnp_extrafilters PRIVATE
extrafiltersplugin.cpp extrafiltersplugin.h
)
+
set_target_properties(pnp_extrafilters PROPERTIES
LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/app"
)
+
target_include_directories(pnp_extrafilters PUBLIC
../../app
)
diff --git a/examples/widgets/tools/regularexpression/CMakeLists.txt b/examples/widgets/tools/regularexpression/CMakeLists.txt
index 85f9a81156..c249eda5ac 100644
--- a/examples/widgets/tools/regularexpression/CMakeLists.txt
+++ b/examples/widgets/tools/regularexpression/CMakeLists.txt
@@ -8,7 +8,7 @@ set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
+ set(INSTALL_EXAMPLESDIR "examples")
endif()
set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tools/regularexpression")
@@ -19,17 +19,18 @@ qt_add_executable(regularexpression
main.cpp
regularexpressiondialog.cpp regularexpressiondialog.h
)
+
set_target_properties(regularexpression PROPERTIES
WIN32_EXECUTABLE TRUE
MACOSX_BUNDLE TRUE
)
+
target_link_libraries(regularexpression PUBLIC
Qt::Core
Qt::Gui
Qt::Widgets
)
-
# Resources:
set(regularexpression_resource_files
"images/copy.png"
diff --git a/examples/widgets/tools/settingseditor/CMakeLists.txt b/examples/widgets/tools/settingseditor/CMakeLists.txt
index e1b6f95eb5..11795c260b 100644
--- a/examples/widgets/tools/settingseditor/CMakeLists.txt
+++ b/examples/widgets/tools/settingseditor/CMakeLists.txt
@@ -8,7 +8,7 @@ set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
+ set(INSTALL_EXAMPLESDIR "examples")
endif()
set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tools/settingseditor")
@@ -22,10 +22,12 @@ qt_add_executable(settingseditor
settingstree.cpp settingstree.h
variantdelegate.cpp variantdelegate.h
)
+
set_target_properties(settingseditor PROPERTIES
WIN32_EXECUTABLE TRUE
MACOSX_BUNDLE TRUE
)
+
target_link_libraries(settingseditor PUBLIC
Qt::Core
Qt::Gui
diff --git a/examples/widgets/tools/styleplugin/plugin/CMakeLists.txt b/examples/widgets/tools/styleplugin/plugin/CMakeLists.txt
index 30a06231c1..fb2b877ca6 100644
--- a/examples/widgets/tools/styleplugin/plugin/CMakeLists.txt
+++ b/examples/widgets/tools/styleplugin/plugin/CMakeLists.txt
@@ -1,13 +1,16 @@
qt_add_plugin(simplestyleplugin
CLASS_NAME SimpleStylePlugin
)
+
target_sources(simplestyleplugin PRIVATE
simplestyle.cpp simplestyle.h
simplestyleplugin.cpp simplestyleplugin.h
)
+
set_target_properties(simplestyleplugin PROPERTIES
LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/stylewindow/styles"
)
+
target_link_libraries(simplestyleplugin PRIVATE
Qt::Core
Qt::Gui
diff --git a/examples/widgets/tools/styleplugin/stylewindow/CMakeLists.txt b/examples/widgets/tools/styleplugin/stylewindow/CMakeLists.txt
index aab63afbf2..fe844aaf4b 100644
--- a/examples/widgets/tools/styleplugin/stylewindow/CMakeLists.txt
+++ b/examples/widgets/tools/styleplugin/stylewindow/CMakeLists.txt
@@ -2,15 +2,18 @@ qt_add_executable(styleplugin
main.cpp
stylewindow.cpp stylewindow.h
)
+
set_target_properties(styleplugin PROPERTIES
WIN32_EXECUTABLE TRUE
MACOSX_BUNDLE TRUE
)
+
target_link_libraries(styleplugin PRIVATE
Qt::Core
Qt::Gui
Qt::Widgets
)
+
if(NOT QT6_IS_SHARED_LIBS_BUILD)
target_link_libraries(styleplugin PRIVATE
simplestyleplugin
diff --git a/examples/widgets/tools/treemodelcompleter/CMakeLists.txt b/examples/widgets/tools/treemodelcompleter/CMakeLists.txt
index 1e641fc5b2..64b5e67309 100644
--- a/examples/widgets/tools/treemodelcompleter/CMakeLists.txt
+++ b/examples/widgets/tools/treemodelcompleter/CMakeLists.txt
@@ -8,7 +8,7 @@ set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
+ set(INSTALL_EXAMPLESDIR "examples")
endif()
set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tools/treemodelcompleter")
@@ -20,17 +20,18 @@ qt_add_executable(treemodelcompleter
mainwindow.cpp mainwindow.h
treemodelcompleter.cpp treemodelcompleter.h
)
+
set_target_properties(treemodelcompleter PROPERTIES
WIN32_EXECUTABLE TRUE
MACOSX_BUNDLE TRUE
)
+
target_link_libraries(treemodelcompleter PUBLIC
Qt::Core
Qt::Gui
Qt::Widgets
)
-
# Resources:
set(treemodelcompleter_resource_files
"resources/treemodel.txt"
diff --git a/examples/widgets/tools/undo/CMakeLists.txt b/examples/widgets/tools/undo/CMakeLists.txt
index 113b3b5a6d..0b9e5047e6 100644
--- a/examples/widgets/tools/undo/CMakeLists.txt
+++ b/examples/widgets/tools/undo/CMakeLists.txt
@@ -8,7 +8,7 @@ set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
+ set(INSTALL_EXAMPLESDIR "examples")
endif()
set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tools/undo")
@@ -21,17 +21,18 @@ qt_add_executable(undo
main.cpp
mainwindow.cpp mainwindow.h mainwindow.ui
)
+
set_target_properties(undo PROPERTIES
WIN32_EXECUTABLE TRUE
MACOSX_BUNDLE TRUE
)
+
target_link_libraries(undo PUBLIC
Qt::Core
Qt::Gui
Qt::Widgets
)
-
# Resources:
set(undo_resource_files
"icons/background.png"
diff --git a/examples/widgets/tools/undoframework/CMakeLists.txt b/examples/widgets/tools/undoframework/CMakeLists.txt
index c142f5d863..0d43d4a669 100644
--- a/examples/widgets/tools/undoframework/CMakeLists.txt
+++ b/examples/widgets/tools/undoframework/CMakeLists.txt
@@ -8,7 +8,7 @@ set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
+ set(INSTALL_EXAMPLESDIR "examples")
endif()
set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tools/undoframework")
@@ -22,17 +22,18 @@ qt_add_executable(undoframework
main.cpp
mainwindow.cpp mainwindow.h
)
+
set_target_properties(undoframework PROPERTIES
WIN32_EXECUTABLE TRUE
MACOSX_BUNDLE TRUE
)
+
target_link_libraries(undoframework PUBLIC
Qt::Core
Qt::Gui
Qt::Widgets
)
-
# Resources:
set(undoframework_resource_files
"images/cross.png"