From: Simon McVittie Date: Mon, 28 Apr 2025 12:36:17 +0000 (+0100) Subject: meson: Only set session_socket_dir on Unix X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f2d18135fb1de40b60225482f4dce05c16472b40;p=thirdparty%2Fdbus.git 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 --- diff --git a/meson.build b/meson.build index 99db2f171..70a4c1f2e 100644 --- a/meson.build +++ b/meson.build @@ -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:".