Add tde_setup_dbus macro.

This resolves issue #20.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit ac342e63c6)
v3.5.13-sru
Slávek Banko 6 years ago
parent 28fed6ab1a
commit 310fec7a51
No known key found for this signature in database
GPG Key ID: 608F5293A04BE668

@ -1863,6 +1863,84 @@ macro( tde_setup_largefiles )
endmacro( ) endmacro( )
#################################################
#####
##### tde_setup_dbus
macro( tde_setup_dbus )
if( NOT DBUS_FOUND )
pkg_search_module( DBUS dbus-1 )
if( NOT DBUS_FOUND )
tde_message_fatal( "dbus-1 is required, but not found on your system" )
endif( )
endif( )
if( NOT DEFINED DBUS_SYSTEM_CONF_DIRECTORY )
execute_process(
COMMAND ${PKG_CONFIG_EXECUTABLE}
dbus-1 --variable=sysconfdir
OUTPUT_VARIABLE DBUS_SYSTEM_CONF_BASE
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if( DBUS_SYSTEM_CONF_BASE )
set( DBUS_SYSTEM_CONF_DIRECTORY "${DBUS_SYSTEM_CONF_BASE}/dbus-1/system.d" )
message( STATUS "Using " ${DBUS_SYSTEM_CONF_DIRECTORY} " for DBUS system configuration files" )
else( )
tde_message_fatal( "Can not find the base directory for the dbus-1 configuration" )
endif( )
endif( )
if( NOT DEFINED DBUS_SESSION_CONF_DIRECTORY )
execute_process(
COMMAND ${PKG_CONFIG_EXECUTABLE}
dbus-1 --variable=sysconfdir
OUTPUT_VARIABLE DBUS_SYSTEM_CONF_BASE
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if( DBUS_SYSTEM_CONF_BASE )
set( DBUS_SESSION_CONF_DIRECTORY "${DBUS_SYSTEM_CONF_BASE}/dbus-1/session.d" )
message( STATUS "Using " ${DBUS_SESSION_CONF_DIRECTORY} " for DBUS session configuration files" )
else( )
tde_message_fatal( "Can not find the base directory for the dbus-1 configuration" )
endif( )
endif( )
if( NOT DEFINED DBUS_SERVICE_DIRECTORY )
execute_process(
COMMAND ${PKG_CONFIG_EXECUTABLE}
dbus-1 --variable=system_bus_services_dir
OUTPUT_VARIABLE DBUS_SERVICE_DIRECTORY
OUTPUT_STRIP_TRAILING_WHITESPACE
)
message( STATUS "Using " ${DBUS_SERVICE_DIRECTORY} " for DBUS system service files" )
endif( )
if( NOT DEFINED DBUS_SESSION_DIRECTORY )
execute_process(
COMMAND ${PKG_CONFIG_EXECUTABLE}
dbus-1 --variable=session_bus_services_dir
OUTPUT_VARIABLE DBUS_SESSION_DIRECTORY
OUTPUT_STRIP_TRAILING_WHITESPACE
)
message( STATUS "Using " ${DBUS_SESSION_DIRECTORY} " for DBUS session service files" )
endif( )
if( NOT "${ARGV}" STREQUAL "" AND NOT DBUS_TQT_FOUND )
pkg_search_module( DBUS_TQT ${ARGV} )
if( NOT DBUS_TQT_FOUND )
tde_message_fatal( "${ARGV} is required, but not found on your system" )
endif( )
endif( )
if( "${ARGV}" STREQUAL "dbus-1-tqt" AND NOT DEFINED DBUSXML2QT3_EXECUTABLE )
find_program( DBUSXML2QT3_EXECUTABLE
NAMES dbusxml2qt3
HINTS "${TDE_PREFIX}/bin" ${BIN_INSTALL_DIR}
)
endif( )
endmacro( )
################################################ ################################################
##### #####
##### Restore CMP0026 policy ##### Restore CMP0026 policy

Loading…
Cancel
Save