summaryrefslogtreecommitdiffstats
path: root/examples/dbus
diff options
context:
space:
mode:
Diffstat (limited to 'examples/dbus')
-rw-r--r--examples/dbus/CMakeLists.txt13
-rw-r--r--examples/dbus/chat/CMakeLists.txt44
-rw-r--r--examples/dbus/complexpingpong/CMakeLists.txt27
-rw-r--r--examples/dbus/listnames/CMakeLists.txt27
-rw-r--r--examples/dbus/pingpong/CMakeLists.txt28
-rw-r--r--examples/dbus/remotecontrolledcar/CMakeLists.txt4
-rw-r--r--examples/dbus/remotecontrolledcar/car/CMakeLists.txt39
-rw-r--r--examples/dbus/remotecontrolledcar/controller/CMakeLists.txt37
8 files changed, 219 insertions, 0 deletions
diff --git a/examples/dbus/CMakeLists.txt b/examples/dbus/CMakeLists.txt
new file mode 100644
index 0000000000..42a3df658a
--- /dev/null
+++ b/examples/dbus/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from dbus.pro.
+
+add_subdirectory(listnames)
+add_subdirectory(pingpong)
+
+if(QT_FEATURE_process)
+ add_subdirectory(complexpingpong)
+endif()
+
+if(TARGET Qt::Widgets)
+ add_subdirectory(chat)
+ add_subdirectory(remotecontrolledcar)
+endif()
diff --git a/examples/dbus/chat/CMakeLists.txt b/examples/dbus/chat/CMakeLists.txt
new file mode 100644
index 0000000000..59036e2cbd
--- /dev/null
+++ b/examples/dbus/chat/CMakeLists.txt
@@ -0,0 +1,44 @@
+# Generated from chat.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(chat LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt6 COMPONENTS DBus)
+find_package(Qt6 COMPONENTS Widgets)
+
+# special case begin
+set(chat_SRCS)
+qt5_add_dbus_interface(chat_SRCS
+ org.example.chat.xml
+ chat_interface
+)
+qt5_add_dbus_adaptor(chat_SRCS
+ org.example.chat.xml
+ qobject.h
+ QObject
+ chat_adaptor
+)
+# special case end
+add_qt_gui_executable(chat
+ chat.cpp chat.h
+ chatmainwindow.ui
+ chatsetnickname.ui
+ ${chat_SRCS} # special case
+)
+target_link_libraries(chat PUBLIC
+ Qt::DBus
+ Qt::Widgets
+)
+install(TARGETS chat
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/dbus/complexpingpong/CMakeLists.txt b/examples/dbus/complexpingpong/CMakeLists.txt
new file mode 100644
index 0000000000..01a824e5e7
--- /dev/null
+++ b/examples/dbus/complexpingpong/CMakeLists.txt
@@ -0,0 +1,27 @@
+# Generated from complexpong.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(complexpong LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt6 COMPONENTS DBus)
+
+add_qt_gui_executable(complexpong
+ complexpong.cpp complexpong.h
+)
+target_link_libraries(complexpong PUBLIC
+ # Remove: gui
+ Qt::DBus
+)
+install(TARGETS complexpong
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/dbus/listnames/CMakeLists.txt b/examples/dbus/listnames/CMakeLists.txt
new file mode 100644
index 0000000000..60c91ba8b4
--- /dev/null
+++ b/examples/dbus/listnames/CMakeLists.txt
@@ -0,0 +1,27 @@
+# Generated from listnames.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(listnames LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt6 COMPONENTS DBus)
+
+add_qt_gui_executable(listnames
+ listnames.cpp
+)
+target_link_libraries(listnames PUBLIC
+ # Remove: gui
+ Qt::DBus
+)
+install(TARGETS listnames
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/dbus/pingpong/CMakeLists.txt b/examples/dbus/pingpong/CMakeLists.txt
new file mode 100644
index 0000000000..6a2a84e974
--- /dev/null
+++ b/examples/dbus/pingpong/CMakeLists.txt
@@ -0,0 +1,28 @@
+# Generated from pong.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(pong LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt6 COMPONENTS DBus)
+
+add_qt_gui_executable(pong
+ ping-common.h
+ pong.cpp pong.h
+)
+target_link_libraries(pong PUBLIC
+ # Remove: gui
+ Qt::DBus
+)
+install(TARGETS pong
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/dbus/remotecontrolledcar/CMakeLists.txt b/examples/dbus/remotecontrolledcar/CMakeLists.txt
new file mode 100644
index 0000000000..4d41919962
--- /dev/null
+++ b/examples/dbus/remotecontrolledcar/CMakeLists.txt
@@ -0,0 +1,4 @@
+# Generated from remotecontrolledcar.pro.
+
+add_subdirectory(car)
+add_subdirectory(controller)
diff --git a/examples/dbus/remotecontrolledcar/car/CMakeLists.txt b/examples/dbus/remotecontrolledcar/car/CMakeLists.txt
new file mode 100644
index 0000000000..1265f7cebd
--- /dev/null
+++ b/examples/dbus/remotecontrolledcar/car/CMakeLists.txt
@@ -0,0 +1,39 @@
+# Generated from car.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(car LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt6 COMPONENTS DBus)
+find_package(Qt6 COMPONENTS Widgets)
+
+# special case begin
+set(car_SRCS)
+qt5_add_dbus_adaptor(car_SRCS
+ car.xml
+ car.h
+ Car
+ car_adaptor
+)
+# special case end
+add_qt_gui_executable(car
+ car.cpp car.h
+ main.cpp
+ ${car_SRCS} # special case
+)
+target_link_libraries(car PUBLIC
+ Qt::DBus
+ Qt::Widgets
+)
+install(TARGETS car
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/dbus/remotecontrolledcar/controller/CMakeLists.txt b/examples/dbus/remotecontrolledcar/controller/CMakeLists.txt
new file mode 100644
index 0000000000..1b01e82cf2
--- /dev/null
+++ b/examples/dbus/remotecontrolledcar/controller/CMakeLists.txt
@@ -0,0 +1,37 @@
+# Generated from controller.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(controller LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt6 COMPONENTS DBus)
+find_package(Qt6 COMPONENTS Widgets)
+
+# special case begin
+set(controller_SRCS)
+qt5_add_dbus_interface(controller_SRCS
+ car.xml
+ car_interface
+)
+# special case end
+add_qt_gui_executable(controller
+ controller.cpp controller.h controller.ui
+ main.cpp
+ ${controller_SRCS} # special case
+)
+target_link_libraries(controller PUBLIC
+ Qt::DBus
+ Qt::Widgets
+)
+install(TARGETS controller
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)