summaryrefslogtreecommitdiffstats
path: root/examples/dbus
diff options
context:
space:
mode:
Diffstat (limited to 'examples/dbus')
-rw-r--r--examples/dbus/chat/CMakeLists.txt19
-rw-r--r--examples/dbus/complexpingpong/CMakeLists.txt26
-rw-r--r--examples/dbus/pingpong/CMakeLists.txt26
-rw-r--r--examples/dbus/remotecontrolledcar/car/CMakeLists.txt19
-rw-r--r--examples/dbus/remotecontrolledcar/controller/CMakeLists.txt19
5 files changed, 64 insertions, 45 deletions
diff --git a/examples/dbus/chat/CMakeLists.txt b/examples/dbus/chat/CMakeLists.txt
index 1aac83706a..472d893dee 100644
--- a/examples/dbus/chat/CMakeLists.txt
+++ b/examples/dbus/chat/CMakeLists.txt
@@ -6,12 +6,6 @@ project(chat LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
-if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
-endif()
-
-set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/dbus/chat")
-
find_package(Qt6 REQUIRED COMPONENTS Core DBus Gui Widgets)
qt_standard_project_setup()
@@ -48,7 +42,14 @@ target_link_libraries(chat PRIVATE
)
install(TARGETS chat
- RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
- BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
- LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION .
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+)
+
+qt_generate_deploy_app_script(
+ TARGET chat
+ OUTPUT_SCRIPT deploy_script
+ NO_UNSUPPORTED_PLATFORM_ERROR
)
+install(SCRIPT ${deploy_script})
diff --git a/examples/dbus/complexpingpong/CMakeLists.txt b/examples/dbus/complexpingpong/CMakeLists.txt
index 55e8003fb7..da4ca95288 100644
--- a/examples/dbus/complexpingpong/CMakeLists.txt
+++ b/examples/dbus/complexpingpong/CMakeLists.txt
@@ -8,12 +8,6 @@ if (ANDROID)
message(FATAL_ERROR "This project cannot be built on Android.")
endif()
-if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
-endif()
-
-set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/dbus/complexpingpong")
-
find_package(Qt6 REQUIRED COMPONENTS Core DBus)
qt_standard_project_setup()
@@ -38,7 +32,21 @@ target_link_libraries(complexpong PRIVATE
)
install(TARGETS complexping complexpong
- RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
- BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
- LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION .
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+)
+
+qt_generate_deploy_app_script(
+ TARGET complexping
+ OUTPUT_SCRIPT deploy_script
+ NO_UNSUPPORTED_PLATFORM_ERROR
+)
+install(SCRIPT ${deploy_script})
+
+qt_generate_deploy_app_script(
+ TARGET complexpong
+ OUTPUT_SCRIPT deploy_script
+ NO_UNSUPPORTED_PLATFORM_ERROR
)
+install(SCRIPT ${deploy_script})
diff --git a/examples/dbus/pingpong/CMakeLists.txt b/examples/dbus/pingpong/CMakeLists.txt
index fb3a411956..d159ad9ba4 100644
--- a/examples/dbus/pingpong/CMakeLists.txt
+++ b/examples/dbus/pingpong/CMakeLists.txt
@@ -8,12 +8,6 @@ if (ANDROID)
message(FATAL_ERROR "This project cannot be built on Android.")
endif()
-if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
-endif()
-
-set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/dbus/pingpong")
-
find_package(Qt6 REQUIRED COMPONENTS Core DBus)
qt_standard_project_setup()
@@ -39,7 +33,21 @@ target_link_libraries(pong PRIVATE
)
install(TARGETS ping pong
- RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
- BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
- LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION .
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+)
+
+qt_generate_deploy_app_script(
+ TARGET ping
+ OUTPUT_SCRIPT deploy_script
+ NO_UNSUPPORTED_PLATFORM_ERROR
+)
+install(SCRIPT ${deploy_script})
+
+qt_generate_deploy_app_script(
+ TARGET pong
+ OUTPUT_SCRIPT deploy_script
+ NO_UNSUPPORTED_PLATFORM_ERROR
)
+install(SCRIPT ${deploy_script})
diff --git a/examples/dbus/remotecontrolledcar/car/CMakeLists.txt b/examples/dbus/remotecontrolledcar/car/CMakeLists.txt
index c96aef0e23..24bbdb669c 100644
--- a/examples/dbus/remotecontrolledcar/car/CMakeLists.txt
+++ b/examples/dbus/remotecontrolledcar/car/CMakeLists.txt
@@ -3,12 +3,6 @@
set(CMAKE_INCLUDE_CURRENT_DIR ON)
-if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
-endif()
-
-set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/dbus/remotecontrolledcar/car")
-
set(car_SRCS)
qt_add_dbus_adaptor(car_SRCS
../common/car.xml
@@ -36,7 +30,14 @@ target_link_libraries(car PRIVATE
)
install(TARGETS car
- RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
- BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
- LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION .
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+)
+
+qt_generate_deploy_app_script(
+ TARGET car
+ OUTPUT_SCRIPT deploy_script
+ NO_UNSUPPORTED_PLATFORM_ERROR
)
+install(SCRIPT ${deploy_script})
diff --git a/examples/dbus/remotecontrolledcar/controller/CMakeLists.txt b/examples/dbus/remotecontrolledcar/controller/CMakeLists.txt
index 9dc62b0e1a..a0c1aea7c5 100644
--- a/examples/dbus/remotecontrolledcar/controller/CMakeLists.txt
+++ b/examples/dbus/remotecontrolledcar/controller/CMakeLists.txt
@@ -3,12 +3,6 @@
set(CMAKE_INCLUDE_CURRENT_DIR ON)
-if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
-endif()
-
-set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/dbus/remotecontrolledcar/controller")
-
set(controller_SRCS)
qt_add_dbus_interface(controller_SRCS
../common/car.xml
@@ -46,7 +40,14 @@ target_link_libraries(controller PRIVATE
)
install(TARGETS controller
- RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
- BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
- LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION .
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+)
+
+qt_generate_deploy_app_script(
+ TARGET controller
+ OUTPUT_SCRIPT deploy_script
+ NO_UNSUPPORTED_PLATFORM_ERROR
)
+install(SCRIPT ${deploy_script})