summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2019-01-31 01:52:09 +0100
committerSlávek Banko <slavek.banko@axis.cz>2019-01-31 01:52:09 +0100
commitd02522eda172758df733e1497366cd6e0e5947fa (patch)
treeadc6e4352991311f70a79056eec71fd83d36c331 /modules
parenta2fbe3aa43f55981b951b373e2fd10dfde3b5258 (diff)
downloadtde-cmake-d02522eda172758df733e1497366cd6e0e5947fa.tar.gz
tde-cmake-d02522eda172758df733e1497366cd6e0e5947fa.zip
Update tde_setup_dbus macro
+ Old versions of dbus do not include a definition for system_bus_services_dir. + The value for system_bus_services_dir is derived from session_bus_services_dir. Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'modules')
-rw-r--r--modules/TDEMacros.cmake24
1 files changed, 16 insertions, 8 deletions
diff --git a/modules/TDEMacros.cmake b/modules/TDEMacros.cmake
index 338625d..5b8e2ee 100644
--- a/modules/TDEMacros.cmake
+++ b/modules/TDEMacros.cmake
@@ -2055,24 +2055,32 @@ macro( tde_setup_dbus )
endif( )
endif( )
- if( NOT DEFINED DBUS_SERVICE_DIRECTORY )
+ if( NOT DEFINED DBUS_SESSION_DIRECTORY )
execute_process(
COMMAND ${PKG_CONFIG_EXECUTABLE}
- dbus-1 --variable=system_bus_services_dir
- OUTPUT_VARIABLE DBUS_SERVICE_DIRECTORY
+ dbus-1 --variable=session_bus_services_dir
+ OUTPUT_VARIABLE DBUS_SESSION_DIRECTORY
OUTPUT_STRIP_TRAILING_WHITESPACE
)
- message( STATUS "Using " ${DBUS_SERVICE_DIRECTORY} " for DBUS system service files" )
+ message( STATUS "Using " ${DBUS_SESSION_DIRECTORY} " for DBUS session service files" )
endif( )
- if( NOT DEFINED DBUS_SESSION_DIRECTORY )
+ if( NOT DEFINED DBUS_SERVICE_DIRECTORY )
execute_process(
COMMAND ${PKG_CONFIG_EXECUTABLE}
- dbus-1 --variable=session_bus_services_dir
- OUTPUT_VARIABLE DBUS_SESSION_DIRECTORY
+ dbus-1 --variable=system_bus_services_dir
+ OUTPUT_VARIABLE DBUS_SERVICE_DIRECTORY
OUTPUT_STRIP_TRAILING_WHITESPACE
)
- message( STATUS "Using " ${DBUS_SESSION_DIRECTORY} " for DBUS session service files" )
+ if( "${DBUS_SERVICE_DIRECTORY}" STREQUAL "" )
+ if( "${DBUS_SESSION_DIRECTORY}" MATCHES "/services$" )
+ string( REGEX REPLACE "/services$" "/system-services"
+ DBUS_SERVICE_DIRECTORY "${DBUS_SESSION_DIRECTORY}" )
+ else( )
+ tde_message_fatal( "Directory for DBUS system service files can not be determined." )
+ endif( )
+ endif( )
+ message( STATUS "Using " ${DBUS_SERVICE_DIRECTORY} " for DBUS system service files" )
endif( )
if( NOT "${ARGV}" STREQUAL "" AND NOT DBUS_TQT_FOUND )