summaryrefslogtreecommitdiff
path: root/examples/serialport
diff options
context:
space:
mode:
Diffstat (limited to 'examples/serialport')
-rw-r--r--examples/serialport/blockingmaster/CMakeLists.txt2
-rw-r--r--examples/serialport/blockingslave/CMakeLists.txt2
-rw-r--r--examples/serialport/cenumerator/CMakeLists.txt2
-rw-r--r--examples/serialport/creaderasync/CMakeLists.txt2
-rw-r--r--examples/serialport/creadersync/CMakeLists.txt2
-rw-r--r--examples/serialport/cwriterasync/CMakeLists.txt2
-rw-r--r--examples/serialport/cwritersync/CMakeLists.txt2
-rw-r--r--examples/serialport/enumerator/CMakeLists.txt2
-rw-r--r--examples/serialport/master/CMakeLists.txt9
-rw-r--r--examples/serialport/slave/CMakeLists.txt9
-rw-r--r--examples/serialport/terminal/CMakeLists.txt6
11 files changed, 27 insertions, 13 deletions
diff --git a/examples/serialport/blockingmaster/CMakeLists.txt b/examples/serialport/blockingmaster/CMakeLists.txt
index dbcd935..da9524b 100644
--- a/examples/serialport/blockingmaster/CMakeLists.txt
+++ b/examples/serialport/blockingmaster/CMakeLists.txt
@@ -9,7 +9,7 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/serialport/blockingmaster")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/serialport/blockingslave/CMakeLists.txt b/examples/serialport/blockingslave/CMakeLists.txt
index 4b63a3c..edb7450 100644
--- a/examples/serialport/blockingslave/CMakeLists.txt
+++ b/examples/serialport/blockingslave/CMakeLists.txt
@@ -9,7 +9,7 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/serialport/blockingslave")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/serialport/cenumerator/CMakeLists.txt b/examples/serialport/cenumerator/CMakeLists.txt
index 6e53189..04359c6 100644
--- a/examples/serialport/cenumerator/CMakeLists.txt
+++ b/examples/serialport/cenumerator/CMakeLists.txt
@@ -9,7 +9,7 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/serialport/cenumerator")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS SerialPort)
diff --git a/examples/serialport/creaderasync/CMakeLists.txt b/examples/serialport/creaderasync/CMakeLists.txt
index 10f2690..1c46533 100644
--- a/examples/serialport/creaderasync/CMakeLists.txt
+++ b/examples/serialport/creaderasync/CMakeLists.txt
@@ -9,7 +9,7 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/serialport/creaderasync")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS SerialPort)
diff --git a/examples/serialport/creadersync/CMakeLists.txt b/examples/serialport/creadersync/CMakeLists.txt
index a00386e..8648013 100644
--- a/examples/serialport/creadersync/CMakeLists.txt
+++ b/examples/serialport/creadersync/CMakeLists.txt
@@ -9,7 +9,7 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/serialport/creadersync")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS SerialPort)
diff --git a/examples/serialport/cwriterasync/CMakeLists.txt b/examples/serialport/cwriterasync/CMakeLists.txt
index 0a0fc1e..c7e8a8e 100644
--- a/examples/serialport/cwriterasync/CMakeLists.txt
+++ b/examples/serialport/cwriterasync/CMakeLists.txt
@@ -9,7 +9,7 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/serialport/cwriterasync")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS SerialPort)
diff --git a/examples/serialport/cwritersync/CMakeLists.txt b/examples/serialport/cwritersync/CMakeLists.txt
index 7f31b78..231ad2e 100644
--- a/examples/serialport/cwritersync/CMakeLists.txt
+++ b/examples/serialport/cwritersync/CMakeLists.txt
@@ -9,7 +9,7 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/serialport/cwritersync")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS SerialPort)
diff --git a/examples/serialport/enumerator/CMakeLists.txt b/examples/serialport/enumerator/CMakeLists.txt
index 7fc5358..10019a8 100644
--- a/examples/serialport/enumerator/CMakeLists.txt
+++ b/examples/serialport/enumerator/CMakeLists.txt
@@ -9,7 +9,7 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/serialport/enumerator")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/serialport/master/CMakeLists.txt b/examples/serialport/master/CMakeLists.txt
index 5b36d92..e14443a 100644
--- a/examples/serialport/master/CMakeLists.txt
+++ b/examples/serialport/master/CMakeLists.txt
@@ -9,7 +9,7 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/serialport/master")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
@@ -23,6 +23,13 @@ target_link_libraries(master PUBLIC
Qt::Gui
)
+if((QT_MAJOR_VERSION GREATER 4))
+ target_link_libraries(master PUBLIC
+ Qt::SerialPort
+ Qt::Widgets
+ )
+endif()
+
install(TARGETS master
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/serialport/slave/CMakeLists.txt b/examples/serialport/slave/CMakeLists.txt
index ce86337..ca819f4 100644
--- a/examples/serialport/slave/CMakeLists.txt
+++ b/examples/serialport/slave/CMakeLists.txt
@@ -9,7 +9,7 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/serialport/slave")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
@@ -23,6 +23,13 @@ target_link_libraries(slave PUBLIC
Qt::Gui
)
+if((QT_MAJOR_VERSION GREATER 4))
+ target_link_libraries(slave PUBLIC
+ Qt::SerialPort
+ Qt::Widgets
+ )
+endif()
+
install(TARGETS slave
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/serialport/terminal/CMakeLists.txt b/examples/serialport/terminal/CMakeLists.txt
index 0130a0a..87d32aa 100644
--- a/examples/serialport/terminal/CMakeLists.txt
+++ b/examples/serialport/terminal/CMakeLists.txt
@@ -9,7 +9,7 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/serialport/terminal")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
@@ -29,6 +29,7 @@ target_link_libraries(terminal PUBLIC
Qt::Widgets
)
+
# Resources:
set(terminal_resource_files
"images/application-exit.png"
@@ -38,14 +39,13 @@ set(terminal_resource_files
"images/settings.png"
)
-QT6_ADD_RESOURCES(terminal "terminal"
+qt6_add_resources(terminal "terminal"
PREFIX
"/"
FILES
${terminal_resource_files}
)
-
install(TARGETS terminal
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"