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/dbus/chat/CMakeLists.txt | 5 +---- examples/dbus/complexpingpong/CMakeLists.txt | 2 +- examples/dbus/listnames/CMakeLists.txt | 3 +-- examples/dbus/pingpong/CMakeLists.txt | 2 +- examples/dbus/remotecontrolledcar/car/CMakeLists.txt | 5 +---- examples/dbus/remotecontrolledcar/controller/CMakeLists.txt | 5 +---- 6 files changed, 6 insertions(+), 16 deletions(-) (limited to 'examples/dbus') diff --git a/examples/dbus/chat/CMakeLists.txt b/examples/dbus/chat/CMakeLists.txt index 72bc4a7ff1..821d38968f 100644 --- a/examples/dbus/chat/CMakeLists.txt +++ b/examples/dbus/chat/CMakeLists.txt @@ -15,10 +15,7 @@ endif() set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/dbus/chat") -find_package(Qt6 COMPONENTS Core) -find_package(Qt6 COMPONENTS Gui) -find_package(Qt6 COMPONENTS DBus) -find_package(Qt6 COMPONENTS Widgets) +find_package(Qt6 REQUIRED COMPONENTS Core DBus Gui Widgets) # special case begin set(chat_SRCS) diff --git a/examples/dbus/complexpingpong/CMakeLists.txt b/examples/dbus/complexpingpong/CMakeLists.txt index 13c6d66850..7302d7b591 100644 --- a/examples/dbus/complexpingpong/CMakeLists.txt +++ b/examples/dbus/complexpingpong/CMakeLists.txt @@ -13,7 +13,7 @@ endif() set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/dbus/complexpingpong") -find_package(Qt6 COMPONENTS Core DBus) +find_package(Qt6 REQUIRED COMPONENTS Core DBus) qt_add_executable(complexping complexping.cpp complexping.h diff --git a/examples/dbus/listnames/CMakeLists.txt b/examples/dbus/listnames/CMakeLists.txt index ff21eea796..13ec3b5572 100644 --- a/examples/dbus/listnames/CMakeLists.txt +++ b/examples/dbus/listnames/CMakeLists.txt @@ -15,8 +15,7 @@ endif() set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/dbus/listnames") -find_package(Qt6 COMPONENTS Core) -find_package(Qt6 COMPONENTS DBus) +find_package(Qt6 REQUIRED COMPONENTS Core DBus) qt_add_executable(listnames listnames.cpp diff --git a/examples/dbus/pingpong/CMakeLists.txt b/examples/dbus/pingpong/CMakeLists.txt index b8ba8231d1..652f784a63 100644 --- a/examples/dbus/pingpong/CMakeLists.txt +++ b/examples/dbus/pingpong/CMakeLists.txt @@ -13,7 +13,7 @@ endif() set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/dbus/pingpong") -find_package(Qt6 COMPONENTS Core DBus) +find_package(Qt6 REQUIRED COMPONENTS Core DBus) qt_add_executable(ping ping.cpp diff --git a/examples/dbus/remotecontrolledcar/car/CMakeLists.txt b/examples/dbus/remotecontrolledcar/car/CMakeLists.txt index 7269cfd1c7..77dc4dd4ba 100644 --- a/examples/dbus/remotecontrolledcar/car/CMakeLists.txt +++ b/examples/dbus/remotecontrolledcar/car/CMakeLists.txt @@ -15,10 +15,7 @@ endif() set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/dbus/remotecontrolledcar/car") -find_package(Qt6 COMPONENTS Core) -find_package(Qt6 COMPONENTS Gui) -find_package(Qt6 COMPONENTS DBus) -find_package(Qt6 COMPONENTS Widgets) +find_package(Qt6 REQUIRED COMPONENTS Core DBus Gui Widgets) # special case begin set(car_SRCS) diff --git a/examples/dbus/remotecontrolledcar/controller/CMakeLists.txt b/examples/dbus/remotecontrolledcar/controller/CMakeLists.txt index 33df2b5ebd..60e5ef5e08 100644 --- a/examples/dbus/remotecontrolledcar/controller/CMakeLists.txt +++ b/examples/dbus/remotecontrolledcar/controller/CMakeLists.txt @@ -15,10 +15,7 @@ endif() set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/dbus/remotecontrolledcar/controller") -find_package(Qt6 COMPONENTS Core) -find_package(Qt6 COMPONENTS Gui) -find_package(Qt6 COMPONENTS DBus) -find_package(Qt6 COMPONENTS Widgets) +find_package(Qt6 REQUIRED COMPONENTS Core DBus Gui Widgets) # special case begin set(controller_SRCS) -- cgit v1.2.3