]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
meson: Only set session_socket_dir on Unix
authorSimon McVittie <smcv@collabora.com>
Mon, 28 Apr 2025 12:36:17 +0000 (13:36 +0100)
committerSimon McVittie <smcv@collabora.com>
Fri, 16 May 2025 10:22:11 +0000 (10:22 +0000)
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>
meson.build

index 99db2f1713d9897f85c3a65f0c129c8c4a3ae725..70a4c1f2eca1901aff2b2683f59bcfe7e3b8a545 100644 (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:".