From 5cd7900d4f54ee0291017dece003ec06d0d2f831 Mon Sep 17 00:00:00 2001 From: Ievgenii Meshcheriakov Date: Mon, 13 Mar 2023 13:57:34 +0100 Subject: [PATCH] remotecontrolledcar example: Move executables into single example project MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This allows building of all the example executables at once. Task-number: QTBUG-111366 Pick-to: 6.5 Change-Id: I1fa372ec9725bfeb1f123305aa7324b7820eb593 Reviewed-by: MÃ¥rten Nordheim --- examples/dbus/CMakeLists.txt | 2 +- examples/dbus/remotecontrolledcar/CMakeLists.txt | 14 ++++++++++++-- .../dbus/remotecontrolledcar/car/CMakeLists.txt | 7 ------- .../remotecontrolledcar/controller/CMakeLists.txt | 7 ------- 4 files changed, 13 insertions(+), 17 deletions(-) diff --git a/examples/dbus/CMakeLists.txt b/examples/dbus/CMakeLists.txt index 9deb2cba36d..738d1e47f78 100644 --- a/examples/dbus/CMakeLists.txt +++ b/examples/dbus/CMakeLists.txt @@ -10,5 +10,5 @@ if(QT_FEATURE_process) endif() if(TARGET Qt6::Widgets) qt_internal_add_example(chat) - add_subdirectory(remotecontrolledcar) + qt_internal_add_example(remotecontrolledcar) endif() diff --git a/examples/dbus/remotecontrolledcar/CMakeLists.txt b/examples/dbus/remotecontrolledcar/CMakeLists.txt index 259d3a04702..17045910268 100644 --- a/examples/dbus/remotecontrolledcar/CMakeLists.txt +++ b/examples/dbus/remotecontrolledcar/CMakeLists.txt @@ -1,2 +1,12 @@ -qt_internal_add_example(car) -qt_internal_add_example(controller) +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause + +cmake_minimum_required(VERSION 3.16) +project(remotecontrolledcar LANGUAGES CXX) + +find_package(Qt6 REQUIRED COMPONENTS Core DBus Gui Widgets) + +qt_standard_project_setup() + +add_subdirectory(car) +add_subdirectory(controller) diff --git a/examples/dbus/remotecontrolledcar/car/CMakeLists.txt b/examples/dbus/remotecontrolledcar/car/CMakeLists.txt index 650f8b14d23..b3d47aaecff 100644 --- a/examples/dbus/remotecontrolledcar/car/CMakeLists.txt +++ b/examples/dbus/remotecontrolledcar/car/CMakeLists.txt @@ -1,9 +1,6 @@ # Copyright (C) 2022 The Qt Company Ltd. # SPDX-License-Identifier: BSD-3-Clause -cmake_minimum_required(VERSION 3.16) -project(car LANGUAGES CXX) - set(CMAKE_INCLUDE_CURRENT_DIR ON) if(NOT DEFINED INSTALL_EXAMPLESDIR) @@ -12,10 +9,6 @@ endif() set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/dbus/remotecontrolledcar/car") -find_package(Qt6 REQUIRED COMPONENTS Core DBus Gui Widgets) - -qt_standard_project_setup() - set(car_SRCS) qt_add_dbus_adaptor(car_SRCS car.xml diff --git a/examples/dbus/remotecontrolledcar/controller/CMakeLists.txt b/examples/dbus/remotecontrolledcar/controller/CMakeLists.txt index 2b2e8916b4d..44f793b26cc 100644 --- a/examples/dbus/remotecontrolledcar/controller/CMakeLists.txt +++ b/examples/dbus/remotecontrolledcar/controller/CMakeLists.txt @@ -1,9 +1,6 @@ # Copyright (C) 2022 The Qt Company Ltd. # SPDX-License-Identifier: BSD-3-Clause -cmake_minimum_required(VERSION 3.16) -project(controller LANGUAGES CXX) - set(CMAKE_INCLUDE_CURRENT_DIR ON) if(NOT DEFINED INSTALL_EXAMPLESDIR) @@ -12,10 +9,6 @@ endif() set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/dbus/remotecontrolledcar/controller") -find_package(Qt6 REQUIRED COMPONENTS Core DBus Gui Widgets) - -qt_standard_project_setup() - set(controller_SRCS) qt_add_dbus_interface(controller_SRCS car.xml