meson: Only set session_socket_dir on Unix

This makes it a little bit clearer that it's OK for the default value
to be Unix-specific. The CMake build system already has the equivalent
of this.

Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
Simon McVittie 2025-04-28 13:36:17 +01:00
parent a363b7c998
commit f2d18135fb

View file

@ -1079,6 +1079,14 @@ values += '/tmp'
default_socket_dir = values.strip().split('\n')[0]
if platform_unix
session_socket_dir = get_option('session_socket_dir')
if session_socket_dir == ''
session_socket_dir = default_socket_dir
endif
config.set_quoted('DBUS_SESSION_SOCKET_DIR', session_socket_dir)
test_socket_dir = get_option('test_socket_dir')
if test_socket_dir == ''
@ -1093,15 +1101,6 @@ endif
config.set_quoted('TEST_LISTEN', test_listen)
data_config.set('TEST_LISTEN', test_listen)
session_socket_dir = get_option('session_socket_dir')
if session_socket_dir == ''
session_socket_dir = default_socket_dir
endif
if platform_unix
config.set_quoted('DBUS_SESSION_SOCKET_DIR', session_socket_dir)
endif
# This must be a listening address. It doesn't necessarily need to be an
# address you can connect to - it can be something vague like
# "nonce-tcp:".