From d02522eda172758df733e1497366cd6e0e5947fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Thu, 31 Jan 2019 01:52:09 +0100 Subject: 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. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko --- modules/TDEMacros.cmake | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) (limited to 'modules') 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 ) -- cgit v1.2.1