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>
pull/25/head
Slávek Banko 6 years ago
parent a2fbe3aa43
commit d02522eda1
No known key found for this signature in database
GPG Key ID: 608F5293A04BE668

@ -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 )

Loading…
Cancel
Save