From 7024e7a62701f99dc2adf519ec2a3ce9d5d7920b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kai=20K=C3=B6hne?= Date: Thu, 2 Dec 2021 08:54:27 +0100 Subject: 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 Reviewed-by: Edward Welbourne --- examples/corelib/threads/mandelbrot/CMakeLists.txt | 4 +--- examples/corelib/threads/queuedcustomtype/CMakeLists.txt | 4 +--- examples/corelib/threads/semaphores/CMakeLists.txt | 2 +- examples/corelib/threads/waitconditions/CMakeLists.txt | 2 +- 4 files changed, 4 insertions(+), 8 deletions(-) (limited to 'examples/corelib/threads') diff --git a/examples/corelib/threads/mandelbrot/CMakeLists.txt b/examples/corelib/threads/mandelbrot/CMakeLists.txt index cb026b9bb0..3a0eebf2b7 100644 --- a/examples/corelib/threads/mandelbrot/CMakeLists.txt +++ b/examples/corelib/threads/mandelbrot/CMakeLists.txt @@ -15,9 +15,7 @@ endif() set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/corelib/threads/mandelbrot") -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(mandelbrot main.cpp diff --git a/examples/corelib/threads/queuedcustomtype/CMakeLists.txt b/examples/corelib/threads/queuedcustomtype/CMakeLists.txt index 921aa1faa4..332a834e51 100644 --- a/examples/corelib/threads/queuedcustomtype/CMakeLists.txt +++ b/examples/corelib/threads/queuedcustomtype/CMakeLists.txt @@ -15,9 +15,7 @@ endif() set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/corelib/threads/queuedcustomtype") -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(queuedcustomtype block.cpp block.h diff --git a/examples/corelib/threads/semaphores/CMakeLists.txt b/examples/corelib/threads/semaphores/CMakeLists.txt index e6ea405673..e4129d5b90 100644 --- a/examples/corelib/threads/semaphores/CMakeLists.txt +++ b/examples/corelib/threads/semaphores/CMakeLists.txt @@ -15,7 +15,7 @@ endif() set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/corelib/threads/semaphores") -find_package(Qt6 COMPONENTS Core) +find_package(Qt6 REQUIRED COMPONENTS Core) qt_add_executable(semaphores semaphores.cpp diff --git a/examples/corelib/threads/waitconditions/CMakeLists.txt b/examples/corelib/threads/waitconditions/CMakeLists.txt index 233717c2aa..a1e81b63d7 100644 --- a/examples/corelib/threads/waitconditions/CMakeLists.txt +++ b/examples/corelib/threads/waitconditions/CMakeLists.txt @@ -15,7 +15,7 @@ endif() set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/corelib/threads/waitconditions") -find_package(Qt6 COMPONENTS Core) +find_package(Qt6 REQUIRED COMPONENTS Core) qt_add_executable(waitconditions waitconditions.cpp -- cgit v1.2.3