summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-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 24c6175..a771a68 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 e835de8..b2db3fe 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 265a728..d982aa4 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 01fe292..f929a46 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 58cc8f8..2fa11cb 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 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