From 9d8174f0777647285c72e0c4da2a75ac9a58e750 Mon Sep 17 00:00:00 2001 From: David Faure Date: Wed, 31 Oct 2012 18:22:22 +0100 Subject: Rename file and macro for consistency, as requested by Alexander. "Can you please rename it to ECMDBusAddActivationService.cmake and the contained macro to ecm_dbus_add_activation_service(), so it follows the naming conventions in cmake (macro has the same name as the file) and ecm (all macros have the prefix ecm)." -> Done. Nothing to adapt in kdelibs-frameworks yet, it has its own copy for now (I'll get rid of it at the next ECM version upgrade). --- modules/ECMDBusAddActivationService.cmake | 42 +++++++++++++++++++++++++++++ modules/MacroDBusAddActivationService.cmake | 42 ----------------------------- 2 files changed, 42 insertions(+), 42 deletions(-) create mode 100644 modules/ECMDBusAddActivationService.cmake delete mode 100644 modules/MacroDBusAddActivationService.cmake (limited to 'modules') diff --git a/modules/ECMDBusAddActivationService.cmake b/modules/ECMDBusAddActivationService.cmake new file mode 100644 index 00000000..d65be03c --- /dev/null +++ b/modules/ECMDBusAddActivationService.cmake @@ -0,0 +1,42 @@ +# Install a DBus ".service" file, so that a program can be started via DBus activation. +# +# ecm_dbus_add_activation_service(inputfile) +# +# This macro will read the input file, generate a .service file from it, and install it +# into the right directory for the dbus server to find it. +# +# Note that in the case of custom install prefixes, the user will have to add the prefix +# to XDG_DATA_DIRS before starting the DBus server. +# +# Example: +# ecm_dbus_add_activation_service(org.mydomain.myapp.service.in) +# +# The file org.mydomain.myapp.service.in contains: +# +# [D-BUS Service] +# Name=org.mydomain.myapp +# Exec=@CMAKE_INSTALL_PREFIX@/bin/myapp +# +# This will create and install PREFIX/share/dbus-1/services/org.mydomain.myapp.service +# +# See http://techbase.kde.org/Development/Tutorials/D-Bus/Autostart_Services for +# a more complete documentation. +# +# Copyright 2012 David Faure +# +# Distributed under the OSI-approved BSD License (the "License"); +# see accompanying file Copyright.txt for details. +# +# This software is distributed WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the License for more information. + +macro(ecm_dbus_add_activation_service _sources) + foreach(_i ${_sources}) + get_filename_component(_service_file ${_i} ABSOLUTE) + string(REGEX REPLACE "\\.service.*$" ".service" _output_file ${_i}) + set(_target ${CMAKE_CURRENT_BINARY_DIR}/${_output_file}) + configure_file(${_service_file} ${_target}) + install(FILES ${_target} DESTINATION ${DBUS_SERVICES_INSTALL_DIR}) + endforeach() +endmacro() diff --git a/modules/MacroDBusAddActivationService.cmake b/modules/MacroDBusAddActivationService.cmake deleted file mode 100644 index d31dab74..00000000 --- a/modules/MacroDBusAddActivationService.cmake +++ /dev/null @@ -1,42 +0,0 @@ -# Install a DBus ".service" file, so that a program can be started via DBus activation. -# -# dbus_add_activation_service(inputfile) -# -# This macro will read the input file, generate a .service file from it, and install it -# into the right directory for the dbus server to find it. -# -# Note that in the case of custom install prefixes, the user will have to add the prefix -# to XDG_DATA_DIRS before starting the DBus server. -# -# Example: -# dbus_add_activation_service(org.mydomain.myapp.service.in) -# -# The file org.mydomain.myapp.service.in contains: -# -# [D-BUS Service] -# Name=org.mydomain.myapp -# Exec=@CMAKE_INSTALL_PREFIX@/bin/myapp -# -# This will create and install PREFIX/share/dbus-1/services/org.mydomain.myapp.service -# -# See http://techbase.kde.org/Development/Tutorials/D-Bus/Autostart_Services for -# a more complete documentation. -# -# Copyright 2012 David Faure -# -# Distributed under the OSI-approved BSD License (the "License"); -# see accompanying file Copyright.txt for details. -# -# This software is distributed WITHOUT ANY WARRANTY; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the License for more information. - -macro(dbus_add_activation_service _sources) - foreach(_i ${_sources}) - get_filename_component(_service_file ${_i} ABSOLUTE) - string(REGEX REPLACE "\\.service.*$" ".service" _output_file ${_i}) - set(_target ${CMAKE_CURRENT_BINARY_DIR}/${_output_file}) - configure_file(${_service_file} ${_target}) - install(FILES ${_target} DESTINATION ${DBUS_SERVICES_INSTALL_DIR}) - endforeach() -endmacro() -- cgit v1.2.1