diff options
author | Ivan Solovev <ivan.solovev@qt.io> | 2023-02-08 10:39:19 +0100 |
---|---|---|
committer | Ivan Solovev <ivan.solovev@qt.io> | 2023-02-10 11:43:49 +0100 |
commit | fb6b5b5109a19e50b03734619ba3f9716b56b2d2 (patch) | |
tree | acb7947f43cfd005e1d4dc3a76ac18519aa8accd /examples/serialport/terminal/CMakeLists.txt | |
parent | 39a5f9b5e22ba711ce88bcbbbb1ba29d86d6d0e0 (diff) | |
download | qtserialport-fb6b5b5109a19e50b03734619ba3f9716b56b2d2.tar.gz |
SerialPort examples: update CMakeLists.txt
* Use qt_standard_project_setup() instead of enabling AUTOMOC and
AUTOUIC manually
* Use versionless CMake functions
* Update check for Qt::Widgets when selecting the examples to build
Task-number: QTBUG-108868
Pick-to: 6.5
Change-Id: I71962ae99ed0586a482282df15a1a1f25d273c35
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'examples/serialport/terminal/CMakeLists.txt')
-rw-r--r-- | examples/serialport/terminal/CMakeLists.txt | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/examples/serialport/terminal/CMakeLists.txt b/examples/serialport/terminal/CMakeLists.txt index 4a5a3d4..e430780 100644 --- a/examples/serialport/terminal/CMakeLists.txt +++ b/examples/serialport/terminal/CMakeLists.txt @@ -4,9 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(terminal LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) -set(CMAKE_AUTOUIC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -15,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/serialport/terminal") find_package(Qt6 REQUIRED COMPONENTS Core Gui SerialPort Widgets) +qt_standard_project_setup() + qt_add_executable(terminal console.cpp console.h main.cpp @@ -43,7 +42,7 @@ set(terminal_resource_files "images/settings.png" ) -qt6_add_resources(terminal "terminal" +qt_add_resources(terminal "terminal" PREFIX "/" FILES |