It's unexpected to have DBUS_SESSION_SOCKET_DIR take different values in
CMakeCache.txt, which lists the variables that are available to be set
by the caller, and in config.h, which makes their final values available
to the C code. If DBUS_SESSION_SOCKET_DIR is empty and we are running
on Unix, set it to its dynamically-chosen fallback before storing it in
the cache.
[smcv: Add commit message]
Co-authored-by: Simon McVittie <smcv@collabora.com>
file(REMOVE ${PROJECT_BINARY_DIR}/data/dbus-1/services)
endif()
-set(DBUS_SESSION_SOCKET_DIR "" CACHE STRING "Default directory for session socket on Unix")
if(UNIX AND NOT DBUS_SESSION_SOCKET_DIR)
set(DBUS_SESSION_SOCKET_DIR /tmp)
endif()
+set(DBUS_SESSION_SOCKET_DIR "${DBUS_SESSION_SOCKET_DIR}" CACHE STRING "Default directory for session socket on Unix")
# Not used on Windows, where there is no system bus
set(DBUS_SYSTEM_PID_FILE ${DBUS_RUNSTATEDIR}/dbus/pid)