summaryrefslogtreecommitdiffstats
path: root/examples/dbus
diff options
context:
space:
mode:
Diffstat (limited to 'examples/dbus')
-rw-r--r--examples/dbus/CMakeLists.txt5
-rw-r--r--examples/dbus/chat/.prev_CMakeLists.txt6
-rw-r--r--examples/dbus/chat/CMakeLists.txt6
-rw-r--r--examples/dbus/complexpingpong/CMakeLists.txt40
-rw-r--r--examples/dbus/listnames/CMakeLists.txt6
-rw-r--r--examples/dbus/pingpong/CMakeLists.txt40
-rw-r--r--examples/dbus/remotecontrolledcar/car/.prev_CMakeLists.txt6
-rw-r--r--examples/dbus/remotecontrolledcar/car/CMakeLists.txt6
-rw-r--r--examples/dbus/remotecontrolledcar/controller/.prev_CMakeLists.txt6
-rw-r--r--examples/dbus/remotecontrolledcar/controller/CMakeLists.txt6
10 files changed, 114 insertions, 13 deletions
diff --git a/examples/dbus/CMakeLists.txt b/examples/dbus/CMakeLists.txt
index 42a3df658a..065cc76022 100644
--- a/examples/dbus/CMakeLists.txt
+++ b/examples/dbus/CMakeLists.txt
@@ -1,12 +1,13 @@
# Generated from dbus.pro.
+if(NOT TARGET Qt::DBus)
+ return()
+endif()
add_subdirectory(listnames)
add_subdirectory(pingpong)
-
if(QT_FEATURE_process)
add_subdirectory(complexpingpong)
endif()
-
if(TARGET Qt::Widgets)
add_subdirectory(chat)
add_subdirectory(remotecontrolledcar)
diff --git a/examples/dbus/chat/.prev_CMakeLists.txt b/examples/dbus/chat/.prev_CMakeLists.txt
index 7889868753..a78bd3683d 100644
--- a/examples/dbus/chat/.prev_CMakeLists.txt
+++ b/examples/dbus/chat/.prev_CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/dbus/chat")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/dbus/chat")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/dbus/chat/CMakeLists.txt b/examples/dbus/chat/CMakeLists.txt
index f2fb0a55f8..e39a960af0 100644
--- a/examples/dbus/chat/CMakeLists.txt
+++ b/examples/dbus/chat/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/dbus/chat")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/dbus/chat")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/dbus/complexpingpong/CMakeLists.txt b/examples/dbus/complexpingpong/CMakeLists.txt
index 01a824e5e7..6ea75ad4e7 100644
--- a/examples/dbus/complexpingpong/CMakeLists.txt
+++ b/examples/dbus/complexpingpong/CMakeLists.txt
@@ -1,6 +1,37 @@
-# Generated from complexpong.pro.
+# Generated from complexpingpong.pro.
cmake_minimum_required(VERSION 3.14)
+project(complexping LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/dbus/complexpingpong")
+
+find_package(Qt6 COMPONENTS DBus)
+
+add_qt_gui_executable(complexping
+ complexping.cpp complexping.h
+ ping-common.h
+)
+target_link_libraries(complexping PUBLIC
+ # Remove: gui
+ Qt::DBus
+)
+
+install(TARGETS complexping
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
+cmake_minimum_required(VERSION 3.14)
project(complexpong LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
@@ -9,7 +40,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/dbus/complexpingpong")
find_package(Qt6 COMPONENTS DBus)
@@ -20,6 +55,7 @@ target_link_libraries(complexpong PUBLIC
# Remove: gui
Qt::DBus
)
+
install(TARGETS complexpong
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/dbus/listnames/CMakeLists.txt b/examples/dbus/listnames/CMakeLists.txt
index acc1db632c..a5a1a4b94f 100644
--- a/examples/dbus/listnames/CMakeLists.txt
+++ b/examples/dbus/listnames/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/dbus/listnames")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/dbus/listnames")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS DBus)
diff --git a/examples/dbus/pingpong/CMakeLists.txt b/examples/dbus/pingpong/CMakeLists.txt
index 6a2a84e974..1c488b857e 100644
--- a/examples/dbus/pingpong/CMakeLists.txt
+++ b/examples/dbus/pingpong/CMakeLists.txt
@@ -1,6 +1,37 @@
-# Generated from pong.pro.
+# Generated from pingpong.pro.
cmake_minimum_required(VERSION 3.14)
+project(ping LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/dbus/pingpong")
+
+find_package(Qt6 COMPONENTS DBus)
+
+add_qt_gui_executable(ping
+ ping.cpp
+ ping-common.h
+)
+target_link_libraries(ping PUBLIC
+ # Remove: gui
+ Qt::DBus
+)
+
+install(TARGETS ping
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
+cmake_minimum_required(VERSION 3.14)
project(pong LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
@@ -9,7 +40,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/dbus/pingpong")
find_package(Qt6 COMPONENTS DBus)
@@ -21,6 +56,7 @@ target_link_libraries(pong PUBLIC
# Remove: gui
Qt::DBus
)
+
install(TARGETS pong
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/dbus/remotecontrolledcar/car/.prev_CMakeLists.txt b/examples/dbus/remotecontrolledcar/car/.prev_CMakeLists.txt
index a028cbcb43..e121c9677c 100644
--- a/examples/dbus/remotecontrolledcar/car/.prev_CMakeLists.txt
+++ b/examples/dbus/remotecontrolledcar/car/.prev_CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/dbus/remotecontrolledcar/car")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/dbus/remotecontrolledcar/car")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/dbus/remotecontrolledcar/car/CMakeLists.txt b/examples/dbus/remotecontrolledcar/car/CMakeLists.txt
index 8be7f9ebd1..142268c1ce 100644
--- a/examples/dbus/remotecontrolledcar/car/CMakeLists.txt
+++ b/examples/dbus/remotecontrolledcar/car/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/dbus/remotecontrolledcar/car")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/dbus/remotecontrolledcar/car")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/dbus/remotecontrolledcar/controller/.prev_CMakeLists.txt b/examples/dbus/remotecontrolledcar/controller/.prev_CMakeLists.txt
index 65c32e7c07..dab43f8076 100644
--- a/examples/dbus/remotecontrolledcar/controller/.prev_CMakeLists.txt
+++ b/examples/dbus/remotecontrolledcar/controller/.prev_CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/dbus/remotecontrolledcar/controller")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/dbus/remotecontrolledcar/controller")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/dbus/remotecontrolledcar/controller/CMakeLists.txt b/examples/dbus/remotecontrolledcar/controller/CMakeLists.txt
index 5ad9d2e51d..cca625fdea 100644
--- a/examples/dbus/remotecontrolledcar/controller/CMakeLists.txt
+++ b/examples/dbus/remotecontrolledcar/controller/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/dbus/remotecontrolledcar/controller")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/dbus/remotecontrolledcar/controller")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)