diff options
author | Kai Köhne <kai.koehne@qt.io> | 2021-12-02 08:54:27 +0100 |
---|---|---|
committer | Kai Köhne <kai.koehne@qt.io> | 2021-12-10 10:48:26 +0100 |
commit | 7024e7a62701f99dc2adf519ec2a3ce9d5d7920b (patch) | |
tree | bc701690586010190a043b181a3e937edcaeb8d2 /examples/widgets/tools | |
parent | 0800947d7d2127eacaabf66ee1702d4980897041 (diff) |
Examples: Use find_package(Qt6 REQUIRED COMPONENTS ...) idiom
Also consolidate several find_package(Qt6 ...) calls in one call.
Task-number: QTBUG-98867
Change-Id: Idfd5e71f46d4489fac7411cbfadb84437a0658f3
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'examples/widgets/tools')
11 files changed, 11 insertions, 27 deletions
diff --git a/examples/widgets/tools/completer/CMakeLists.txt b/examples/widgets/tools/completer/CMakeLists.txt index e03092543e..80f64a6b8a 100644 --- a/examples/widgets/tools/completer/CMakeLists.txt +++ b/examples/widgets/tools/completer/CMakeLists.txt @@ -15,9 +15,7 @@ endif() set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tools/completer") -find_package(Qt6 COMPONENTS Core) -find_package(Qt6 COMPONENTS Gui) -find_package(Qt6 COMPONENTS Widgets) +find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) qt_add_executable(completer fsmodel.cpp fsmodel.h diff --git a/examples/widgets/tools/customcompleter/CMakeLists.txt b/examples/widgets/tools/customcompleter/CMakeLists.txt index c725f85336..2b610e9115 100644 --- a/examples/widgets/tools/customcompleter/CMakeLists.txt +++ b/examples/widgets/tools/customcompleter/CMakeLists.txt @@ -15,9 +15,7 @@ endif() set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tools/customcompleter") -find_package(Qt6 COMPONENTS Core) -find_package(Qt6 COMPONENTS Gui) -find_package(Qt6 COMPONENTS Widgets) +find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) qt_add_executable(customcompleter main.cpp diff --git a/examples/widgets/tools/echoplugin/CMakeLists.txt b/examples/widgets/tools/echoplugin/CMakeLists.txt index 6e32a4de09..93b49b43d7 100644 --- a/examples/widgets/tools/echoplugin/CMakeLists.txt +++ b/examples/widgets/tools/echoplugin/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.16) project(plugandpaint LANGUAGES CXX) -find_package(Qt6 COMPONENTS Core Gui Widgets) +find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) set(CMAKE_AUTOMOC ON) diff --git a/examples/widgets/tools/i18n/CMakeLists.txt b/examples/widgets/tools/i18n/CMakeLists.txt index 4ff9402dec..8e9e3115ed 100644 --- a/examples/widgets/tools/i18n/CMakeLists.txt +++ b/examples/widgets/tools/i18n/CMakeLists.txt @@ -15,9 +15,7 @@ endif() set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tools/i18n") -find_package(Qt6 COMPONENTS Core) -find_package(Qt6 COMPONENTS Gui) -find_package(Qt6 COMPONENTS Widgets) +find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) qt_add_executable(i18n languagechooser.cpp languagechooser.h diff --git a/examples/widgets/tools/plugandpaint/CMakeLists.txt b/examples/widgets/tools/plugandpaint/CMakeLists.txt index e681812dad..0412243788 100644 --- a/examples/widgets/tools/plugandpaint/CMakeLists.txt +++ b/examples/widgets/tools/plugandpaint/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.16) project(plugandpaint LANGUAGES CXX) -find_package(Qt6 COMPONENTS Core Gui Widgets) +find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) diff --git a/examples/widgets/tools/regularexpression/CMakeLists.txt b/examples/widgets/tools/regularexpression/CMakeLists.txt index 26865e5179..9375688812 100644 --- a/examples/widgets/tools/regularexpression/CMakeLists.txt +++ b/examples/widgets/tools/regularexpression/CMakeLists.txt @@ -15,9 +15,7 @@ endif() set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tools/regularexpression") -find_package(Qt6 COMPONENTS Core) -find_package(Qt6 COMPONENTS Gui) -find_package(Qt6 COMPONENTS Widgets) +find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) qt_add_executable(regularexpression main.cpp diff --git a/examples/widgets/tools/settingseditor/CMakeLists.txt b/examples/widgets/tools/settingseditor/CMakeLists.txt index fc050b5f76..7f8bcca593 100644 --- a/examples/widgets/tools/settingseditor/CMakeLists.txt +++ b/examples/widgets/tools/settingseditor/CMakeLists.txt @@ -15,9 +15,7 @@ endif() set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tools/settingseditor") -find_package(Qt6 COMPONENTS Core) -find_package(Qt6 COMPONENTS Gui) -find_package(Qt6 COMPONENTS Widgets) +find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) qt_add_executable(settingseditor locationdialog.cpp locationdialog.h diff --git a/examples/widgets/tools/styleplugin/CMakeLists.txt b/examples/widgets/tools/styleplugin/CMakeLists.txt index 33412f5306..acd918786d 100644 --- a/examples/widgets/tools/styleplugin/CMakeLists.txt +++ b/examples/widgets/tools/styleplugin/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.16) project(styleplugin LANGUAGES CXX) -find_package(Qt6 COMPONENTS Widgets) +find_package(Qt6 REQUIRED COMPONENTS Widgets) set(CMAKE_AUTOMOC ON) diff --git a/examples/widgets/tools/treemodelcompleter/CMakeLists.txt b/examples/widgets/tools/treemodelcompleter/CMakeLists.txt index 92ec0f7944..e69dac7188 100644 --- a/examples/widgets/tools/treemodelcompleter/CMakeLists.txt +++ b/examples/widgets/tools/treemodelcompleter/CMakeLists.txt @@ -15,9 +15,7 @@ endif() set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tools/treemodelcompleter") -find_package(Qt6 COMPONENTS Core) -find_package(Qt6 COMPONENTS Gui) -find_package(Qt6 COMPONENTS Widgets) +find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) qt_add_executable(treemodelcompleter main.cpp diff --git a/examples/widgets/tools/undo/CMakeLists.txt b/examples/widgets/tools/undo/CMakeLists.txt index 94e63a665c..ee1bb3ed9e 100644 --- a/examples/widgets/tools/undo/CMakeLists.txt +++ b/examples/widgets/tools/undo/CMakeLists.txt @@ -15,9 +15,7 @@ endif() set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tools/undo") -find_package(Qt6 COMPONENTS Core) -find_package(Qt6 COMPONENTS Gui) -find_package(Qt6 COMPONENTS Widgets) +find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) qt_add_executable(undo commands.cpp commands.h diff --git a/examples/widgets/tools/undoframework/CMakeLists.txt b/examples/widgets/tools/undoframework/CMakeLists.txt index a315ab46d6..fa140b790b 100644 --- a/examples/widgets/tools/undoframework/CMakeLists.txt +++ b/examples/widgets/tools/undoframework/CMakeLists.txt @@ -15,9 +15,7 @@ endif() set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tools/undoframework") -find_package(Qt6 COMPONENTS Core) -find_package(Qt6 COMPONENTS Gui) -find_package(Qt6 COMPONENTS Widgets) +find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) qt_add_executable(undoframework commands.cpp commands.h |