diff options
author | Kai Köhne <kai.koehne@qt.io> | 2022-11-15 22:00:14 +0100 |
---|---|---|
committer | Kai Köhne <kai.koehne@qt.io> | 2022-11-17 19:59:11 +0100 |
commit | f562711c642cba7bed6c96d452437ffc9b25edc4 (patch) | |
tree | 4fdfc0718caadac4341b295af0132d3310d49fb5 /examples/widgets/tools | |
parent | bec264c15fe07382009def3c4bbef3f3b689b6eb (diff) |
Examples: Use qt_standard_project_setup()
Change-Id: I0ceab08108b7e58e4e2ed25db9e3c289f5c0ddac
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'examples/widgets/tools')
10 files changed, 20 insertions, 21 deletions
diff --git a/examples/widgets/tools/completer/CMakeLists.txt b/examples/widgets/tools/completer/CMakeLists.txt index 5f7c03f104..0cf49b519b 100644 --- a/examples/widgets/tools/completer/CMakeLists.txt +++ b/examples/widgets/tools/completer/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(completer LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tools/completer") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(completer fsmodel.cpp fsmodel.h main.cpp diff --git a/examples/widgets/tools/customcompleter/CMakeLists.txt b/examples/widgets/tools/customcompleter/CMakeLists.txt index 37b8d18c32..58fba2b75d 100644 --- a/examples/widgets/tools/customcompleter/CMakeLists.txt +++ b/examples/widgets/tools/customcompleter/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(customcompleter LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tools/customcompleter") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(customcompleter main.cpp mainwindow.cpp mainwindow.h diff --git a/examples/widgets/tools/echoplugin/CMakeLists.txt b/examples/widgets/tools/echoplugin/CMakeLists.txt index f4b97aa357..cfe76f4a73 100644 --- a/examples/widgets/tools/echoplugin/CMakeLists.txt +++ b/examples/widgets/tools/echoplugin/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(plugandpaint LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,5 +12,7 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tools/echoplugin") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + add_subdirectory(plugin) add_subdirectory(echowindow) diff --git a/examples/widgets/tools/plugandpaint/CMakeLists.txt b/examples/widgets/tools/plugandpaint/CMakeLists.txt index e94c2164d8..61b7ad728e 100644 --- a/examples/widgets/tools/plugandpaint/CMakeLists.txt +++ b/examples/widgets/tools/plugandpaint/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(plugandpaint LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,5 +12,7 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tools/plugandpaint") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + add_subdirectory(plugins) add_subdirectory(app) diff --git a/examples/widgets/tools/regularexpression/CMakeLists.txt b/examples/widgets/tools/regularexpression/CMakeLists.txt index 7049949ef7..03a095ad6b 100644 --- a/examples/widgets/tools/regularexpression/CMakeLists.txt +++ b/examples/widgets/tools/regularexpression/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(regularexpression LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tools/regularexpression") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(regularexpression main.cpp regularexpressiondialog.cpp regularexpressiondialog.h diff --git a/examples/widgets/tools/settingseditor/CMakeLists.txt b/examples/widgets/tools/settingseditor/CMakeLists.txt index e44395361d..652111c8f1 100644 --- a/examples/widgets/tools/settingseditor/CMakeLists.txt +++ b/examples/widgets/tools/settingseditor/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(settingseditor LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tools/settingseditor") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(settingseditor locationdialog.cpp locationdialog.h main.cpp diff --git a/examples/widgets/tools/styleplugin/CMakeLists.txt b/examples/widgets/tools/styleplugin/CMakeLists.txt index 3cd2d9b78c..7e46a7b2af 100644 --- a/examples/widgets/tools/styleplugin/CMakeLists.txt +++ b/examples/widgets/tools/styleplugin/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(styleplugin LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,5 +12,7 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tools/styleplugin") find_package(Qt6 REQUIRED COMPONENTS Widgets) +qt_standard_project_setup() + add_subdirectory(stylewindow) add_subdirectory(plugin) diff --git a/examples/widgets/tools/treemodelcompleter/CMakeLists.txt b/examples/widgets/tools/treemodelcompleter/CMakeLists.txt index 54ef9aac94..36ab9a5ebb 100644 --- a/examples/widgets/tools/treemodelcompleter/CMakeLists.txt +++ b/examples/widgets/tools/treemodelcompleter/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(treemodelcompleter LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tools/treemodelcompleter" find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(treemodelcompleter main.cpp mainwindow.cpp mainwindow.h diff --git a/examples/widgets/tools/undo/CMakeLists.txt b/examples/widgets/tools/undo/CMakeLists.txt index 17b6ee7931..4a925ba006 100644 --- a/examples/widgets/tools/undo/CMakeLists.txt +++ b/examples/widgets/tools/undo/CMakeLists.txt @@ -6,9 +6,6 @@ project(undo LANGUAGES CXX) set(CMAKE_INCLUDE_CURRENT_DIR ON) -set(CMAKE_AUTOMOC ON) -set(CMAKE_AUTOUIC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -17,6 +14,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tools/undo") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(undo commands.cpp commands.h document.cpp document.h diff --git a/examples/widgets/tools/undoframework/CMakeLists.txt b/examples/widgets/tools/undoframework/CMakeLists.txt index 0dca360cb8..1d6d59e39b 100644 --- a/examples/widgets/tools/undoframework/CMakeLists.txt +++ b/examples/widgets/tools/undoframework/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(undoframework LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tools/undoframework") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(undoframework commands.cpp commands.h diagramitem.cpp diagramitem.h |