summaryrefslogtreecommitdiffstats
path: root/examples/dbus/pingpong
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2020-07-07 15:24:45 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2020-07-09 09:38:28 +0200
commit74cb331af3cfe723ae16cd1b00c9dd9291b4e7e9 (patch)
tree0f4ee41beba41f67a2ea0bb6c0134843a32c9ab6 /examples/dbus/pingpong
parentd98a6d0463fd00e5463828b6a3e4e20db7d6d63e (diff)
CMake: Regenerate examples
Change-Id: I1c51b10af4e2b26f54740f257164c56a0e2a03ce Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'examples/dbus/pingpong')
-rw-r--r--examples/dbus/pingpong/CMakeLists.txt40
1 files changed, 38 insertions, 2 deletions
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}"