Solve the missing system_bus_services_dir with older DBUS #25

Merged
SlavekB merged 1 commits from feat/setup-old-dbus into master 5 years ago

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