summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--examples/serialport/CMakeLists.txt2
-rw-r--r--examples/serialport/blockingreceiver/CMakeLists.txt4
-rw-r--r--examples/serialport/blockingsender/CMakeLists.txt4
-rw-r--r--examples/serialport/receiver/CMakeLists.txt4
-rw-r--r--examples/serialport/sender/CMakeLists.txt4
-rw-r--r--examples/serialport/terminal/CMakeLists.txt7
6 files changed, 12 insertions, 13 deletions
diff --git a/examples/serialport/CMakeLists.txt b/examples/serialport/CMakeLists.txt
index 24c61754..a771a68c 100644
--- a/examples/serialport/CMakeLists.txt
+++ b/examples/serialport/CMakeLists.txt
@@ -3,7 +3,7 @@
qt_internal_add_example(creaderasync)
qt_internal_add_example(cwriterasync)
-if((((NOT QT.widgets.name_ISEMPTY))))
+if(TARGET Qt::Widgets)
qt_internal_add_example(terminal)
qt_internal_add_example(blockingsender)
qt_internal_add_example(blockingreceiver)
diff --git a/examples/serialport/blockingreceiver/CMakeLists.txt b/examples/serialport/blockingreceiver/CMakeLists.txt
index e835de82..b2db3fe8 100644
--- a/examples/serialport/blockingreceiver/CMakeLists.txt
+++ b/examples/serialport/blockingreceiver/CMakeLists.txt
@@ -4,8 +4,6 @@
cmake_minimum_required(VERSION 3.16)
project(blockingreceiver LANGUAGES CXX)
-set(CMAKE_AUTOMOC ON)
-
if(NOT DEFINED INSTALL_EXAMPLESDIR)
set(INSTALL_EXAMPLESDIR "examples")
endif()
@@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/serialport/blockingreceiver")
find_package(Qt6 REQUIRED COMPONENTS Core Gui SerialPort Widgets)
+qt_standard_project_setup()
+
qt_add_executable(blockingreceiver
dialog.cpp dialog.h
main.cpp
diff --git a/examples/serialport/blockingsender/CMakeLists.txt b/examples/serialport/blockingsender/CMakeLists.txt
index 265a728f..d982aa4d 100644
--- a/examples/serialport/blockingsender/CMakeLists.txt
+++ b/examples/serialport/blockingsender/CMakeLists.txt
@@ -4,8 +4,6 @@
cmake_minimum_required(VERSION 3.16)
project(blockingsender LANGUAGES CXX)
-set(CMAKE_AUTOMOC ON)
-
if(NOT DEFINED INSTALL_EXAMPLESDIR)
set(INSTALL_EXAMPLESDIR "examples")
endif()
@@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/serialport/blockingsender")
find_package(Qt6 REQUIRED COMPONENTS Core Gui SerialPort Widgets)
+qt_standard_project_setup()
+
qt_add_executable(blockingsender
dialog.cpp dialog.h
main.cpp
diff --git a/examples/serialport/receiver/CMakeLists.txt b/examples/serialport/receiver/CMakeLists.txt
index 01fe292c..f929a465 100644
--- a/examples/serialport/receiver/CMakeLists.txt
+++ b/examples/serialport/receiver/CMakeLists.txt
@@ -4,8 +4,6 @@
cmake_minimum_required(VERSION 3.16)
project(receiver LANGUAGES CXX)
-set(CMAKE_AUTOMOC ON)
-
if(NOT DEFINED INSTALL_EXAMPLESDIR)
set(INSTALL_EXAMPLESDIR "examples")
endif()
@@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/serialport/receiver")
find_package(Qt6 REQUIRED COMPONENTS Core Gui SerialPort Widgets)
+qt_standard_project_setup()
+
qt_add_executable(receiver
dialog.cpp dialog.h
main.cpp
diff --git a/examples/serialport/sender/CMakeLists.txt b/examples/serialport/sender/CMakeLists.txt
index 58cc8f8e..2fa11cb8 100644
--- a/examples/serialport/sender/CMakeLists.txt
+++ b/examples/serialport/sender/CMakeLists.txt
@@ -4,8 +4,6 @@
cmake_minimum_required(VERSION 3.16)
project(sender LANGUAGES CXX)
-set(CMAKE_AUTOMOC ON)
-
if(NOT DEFINED INSTALL_EXAMPLESDIR)
set(INSTALL_EXAMPLESDIR "examples")
endif()
@@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/serialport/sender")
find_package(Qt6 REQUIRED COMPONENTS Core Gui SerialPort Widgets)
+qt_standard_project_setup()
+
qt_add_executable(sender
dialog.cpp dialog.h
main.cpp
diff --git a/examples/serialport/terminal/CMakeLists.txt b/examples/serialport/terminal/CMakeLists.txt
index 4a5a3d47..e430780c 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