mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-24 02:42:48 +00:00
cmake: new baseline kde4_add_dbus_service() macro replacing dbus_add_activation_service()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
01368b3d51
commit
ea9b5d7ade
5 changed files with 21 additions and 15 deletions
|
@ -70,7 +70,6 @@ set(cmakeFiles
|
||||||
KDE4Defaults.cmake
|
KDE4Defaults.cmake
|
||||||
KDE4Macros.cmake
|
KDE4Macros.cmake
|
||||||
MacroBoolTo01.cmake
|
MacroBoolTo01.cmake
|
||||||
MacroDBusAddActivationService.cmake
|
|
||||||
MacroLibrary.cmake
|
MacroLibrary.cmake
|
||||||
MacroOptionalAddSubdirectory.cmake
|
MacroOptionalAddSubdirectory.cmake
|
||||||
MacroOptionalFindPackage.cmake
|
MacroOptionalFindPackage.cmake
|
||||||
|
|
|
@ -233,7 +233,7 @@ endmacro(KDE4_ADD_WIDGET)
|
||||||
# KDE4_INSTALL_AUTH_HELPER_FILES ( HELPER_TARGET HELPER_ID HELPER_USER )
|
# KDE4_INSTALL_AUTH_HELPER_FILES ( HELPER_TARGET HELPER_ID HELPER_USER )
|
||||||
# This macro adds the needed files for an helper executable meant to be used
|
# This macro adds the needed files for an helper executable meant to be used
|
||||||
# by applications using KAuth. It accepts the helper target, the helper ID
|
# by applications using KAuth. It accepts the helper target, the helper ID
|
||||||
# (the DBUS name) and the user under which the helper will run on.
|
# (the D-Bus name) and the user under which the helper will run on.
|
||||||
#
|
#
|
||||||
# *WARNING* You have to install the helper in ${KDE4_LIBEXEC_INSTALL_DIR} to
|
# *WARNING* You have to install the helper in ${KDE4_LIBEXEC_INSTALL_DIR} to
|
||||||
# make sure everything will work.
|
# make sure everything will work.
|
||||||
|
@ -262,3 +262,22 @@ function(KDE4_INSTALL_AUTH_HELPER_FILES HELPER_TARGET HELPER_ID HELPER_USER)
|
||||||
DESTINATION ${KDE4_DBUS_SYSTEM_SERVICES_INSTALL_DIR}
|
DESTINATION ${KDE4_DBUS_SYSTEM_SERVICES_INSTALL_DIR}
|
||||||
)
|
)
|
||||||
endfunction(KDE4_INSTALL_AUTH_HELPER_FILES)
|
endfunction(KDE4_INSTALL_AUTH_HELPER_FILES)
|
||||||
|
|
||||||
|
# KDE4_ADD_DBUS_SERVICE (file1 ... fileN)
|
||||||
|
# Use this to add D-Bus service activation file(s). The input file(s) must
|
||||||
|
# be ".service.in" suffixed
|
||||||
|
macro(KDE4_ADD_DBUS_SERVICE _sources)
|
||||||
|
foreach(_current_FILE ${_sources})
|
||||||
|
get_filename_component(_input ${_current_FILE} ABSOLUTE)
|
||||||
|
get_filename_component(_basename ${_input} NAME)
|
||||||
|
string(REPLACE ".service.in" ".service" _output_file ${_basename})
|
||||||
|
configure_file(
|
||||||
|
${_input}
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/${_output_file}
|
||||||
|
)
|
||||||
|
install(
|
||||||
|
FILES ${CMAKE_CURRENT_BINARY_DIR}/${_output_file}
|
||||||
|
DESTINATION ${KDE4_DBUS_SERVICES_INSTALL_DIR}
|
||||||
|
)
|
||||||
|
endforeach()
|
||||||
|
endmacro(KDE4_ADD_DBUS_SERVICE)
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
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} @ONLY)
|
|
||||||
install(FILES ${_target} DESTINATION ${KDE4_DBUS_SERVICES_INSTALL_DIR})
|
|
||||||
endforeach (_i ${ARGN})
|
|
||||||
endmacro(dbus_add_activation_service _sources)
|
|
|
@ -9,4 +9,3 @@ INCLUDE(MacroOptionalFindPackage)
|
||||||
INCLUDE(MacroOptionalAddSubdirectory)
|
INCLUDE(MacroOptionalAddSubdirectory)
|
||||||
INCLUDE(MacroAddFileDependencies)
|
INCLUDE(MacroAddFileDependencies)
|
||||||
INCLUDE(MacroBoolTo01)
|
INCLUDE(MacroBoolTo01)
|
||||||
INCLUDE(MacroDBusAddActivationService)
|
|
||||||
|
|
|
@ -37,7 +37,7 @@ install(
|
||||||
DESTINATION ${KDE4_DBUS_INTERFACES_INSTALL_DIR}
|
DESTINATION ${KDE4_DBUS_INTERFACES_INSTALL_DIR}
|
||||||
)
|
)
|
||||||
|
|
||||||
dbus_add_activation_service(org.kde.kded.service.in)
|
kde4_add_dbus_service(org.kde.kded.service.in)
|
||||||
|
|
||||||
########### next target ###############
|
########### next target ###############
|
||||||
|
|
||||||
|
@ -80,5 +80,3 @@ install(
|
||||||
kdedmodule.desktop
|
kdedmodule.desktop
|
||||||
DESTINATION ${KDE4_SERVICETYPES_INSTALL_DIR}
|
DESTINATION ${KDE4_SERVICETYPES_INSTALL_DIR}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue