┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/cmake/DbusInterfaceMacros.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/DbusInterfaceMacros.cmake')
-rw-r--r--cmake/DbusInterfaceMacros.cmake18
1 files changed, 18 insertions, 0 deletions
diff --git a/cmake/DbusInterfaceMacros.cmake b/cmake/DbusInterfaceMacros.cmake
new file mode 100644
index 000000000..0fd2f4c1f
--- /dev/null
+++ b/cmake/DbusInterfaceMacros.cmake
@@ -0,0 +1,18 @@
+macro (generate_and_install_dbus_interface main_project_target header_file output_xml_file)
+ qt5_generate_dbus_interface(
+ ${header_file}
+ ${output_xml_file}
+ )
+ add_custom_target(
+ ${output_xml_file}
+ SOURCES ${CMAKE_CURRENT_BINARY_DIR}/${output_xml_file}
+ )
+ install(
+ FILES ${CMAKE_CURRENT_BINARY_DIR}/${output_xml_file}
+ DESTINATION ${DBUS_INTERFACES_INSTALL_DIR}
+ )
+ add_dependencies(
+ ${main_project_target}
+ ${output_xml_file}
+ )
+endmacro ()