diff options
author | Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io> | 2023-03-13 13:57:34 +0100 |
---|---|---|
committer | Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io> | 2023-03-20 17:14:59 +0100 |
commit | 5cd7900d4f54ee0291017dece003ec06d0d2f831 (patch) | |
tree | 52810314af94122a60f73f4df4018965f00c112c /examples | |
parent | f4f49523ad530956089bc52173cdf4f99644a927 (diff) |
remotecontrolledcar example: Move executables into single example project
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 <marten.nordheim@qt.io>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/dbus/CMakeLists.txt | 2 | ||||
-rw-r--r-- | examples/dbus/remotecontrolledcar/CMakeLists.txt | 14 | ||||
-rw-r--r-- | examples/dbus/remotecontrolledcar/car/CMakeLists.txt | 7 | ||||
-rw-r--r-- | examples/dbus/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 9deb2cba36..738d1e47f7 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 259d3a0470..1704591026 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 650f8b14d2..b3d47aaecf 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 2b2e8916b4..44f793b26c 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 |