summaryrefslogtreecommitdiffstats
path: root/examples/dbus/complexpingpong/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'examples/dbus/complexpingpong/CMakeLists.txt')
-rw-r--r--examples/dbus/complexpingpong/CMakeLists.txt34
1 files changed, 22 insertions, 12 deletions
diff --git a/examples/dbus/complexpingpong/CMakeLists.txt b/examples/dbus/complexpingpong/CMakeLists.txt
index cccb9584af..543af8491b 100644
--- a/examples/dbus/complexpingpong/CMakeLists.txt
+++ b/examples/dbus/complexpingpong/CMakeLists.txt
@@ -1,16 +1,26 @@
# Generated from complexpong.pro.
-#####################################################################
-## complexpong Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(complexpong LANGUAGES CXX)
-add_qt_executable(complexpong
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/dbus/complexpingpong"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/dbus/complexpingpong"
- SOURCES
- complexpong.cpp complexpong.h
- LIBRARIES
- # Remove: gui
- Qt::DBus
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS DBus)
+
+add_executable(complexpong WIN32 MACOSX_BUNDLE
+ complexpong.cpp complexpong.h
+)
+target_link_libraries(complexpong PUBLIC
+ # Remove: gui
+ Qt::DBus
+)
+install(TARGETS complexpong
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)