aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorAlex Merry <alex.merry@kde.org>2014-04-16 11:06:17 +0100
committerAlex Merry <alex.merry@kde.org>2014-04-25 11:07:26 +0100
commit0fd08930a4f70a0a696d19eac309f0cb0087dcf6 (patch)
treea13dac584670538fe04749c2a5593c5b39fbedfd /modules
parenteb8a168c7a184770019d7fcf1dd8ad1a0ba02c80 (diff)
downloadextra-cmake-modules-0fd08930a4f70a0a696d19eac309f0cb0087dcf6.tar.gz
extra-cmake-modules-0fd08930a4f70a0a696d19eac309f0cb0087dcf6.tar.bz2
Remove ECMDBusAddActivationService module
ecm_dbus_add_activation_service() requires suffient knowledge of its internals to use that replacing two lines with one seems silly. In order to use it you have to know it behaves like configure_file() (because you have to construct the file yourself), except that it also installs it somewhere (for which you have to make sure DBUS_SERVICES_INSTALL_DIR is defined before you use it, which is certainly not a given for non-KDE projects). By this point, why not just use configure_file() and install()? The DBUS_SERVICES_INSTALL_DIR provided by KDEInstallDirs is all the magic you actually need, and if that's explicit in the CMakeLists.txt file, it's a lot more obvious that you should have it defined somewhere. REVIEW: 117581
Diffstat (limited to 'modules')
-rw-r--r--modules/ECMDBusAddActivationService.cmake57
1 files changed, 0 insertions, 57 deletions
diff --git a/modules/ECMDBusAddActivationService.cmake b/modules/ECMDBusAddActivationService.cmake
deleted file mode 100644
index 128482e3..00000000
--- a/modules/ECMDBusAddActivationService.cmake
+++ /dev/null
@@ -1,57 +0,0 @@
-#.rst:
-# ECMDBusAddActivationService
-# ---------------------------
-#
-# Install D-Bus activation .service files.
-#
-# ::
-#
-# ecm_dbus_add_activation_service(<inputfile> [<inputfile> [...]])
-#
-# This macro will configure the input file to generate a .service file, 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:
-#
-# .. code-block:: cmake
-#
-# 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 <faure@kde.org>
-#
-# Distributed under the OSI-approved BSD License (the "License");
-# see accompanying file COPYING-CMAKE-SCRIPTS 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.
-#=============================================================================
-# (To distribute this file outside of extra-cmake-modules, substitute the full
-# License text for the above reference.)
-
-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})
- # FIXME: document use of ${DBUS_SERVICES_INSTALL_DIR}, and provide a
- # fallback
- install(FILES ${_target} DESTINATION ${DBUS_SERVICES_INSTALL_DIR})
- endforeach()
-endmacro()