mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-05-11 05:58:03 +02:00
build: Only define DBUS_TEST_SOCKET_DIR on Unix platforms
This makes it more obvious that it is currently only used on Unix, and therefore it's OK for it to have a default that wouldn't work on Windows. The non-default CMake build system already didn't set the variable when building for Windows. Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
parent
d18c7f6889
commit
8a9fddb26d
2 changed files with 22 additions and 8 deletions
|
|
@ -227,8 +227,6 @@
|
||||||
#cmakedefine DBUS_USER "@DBUS_USER@"
|
#cmakedefine DBUS_USER "@DBUS_USER@"
|
||||||
#cmakedefine DBUS_TEST_USER "@DBUS_TEST_USER@"
|
#cmakedefine DBUS_TEST_USER "@DBUS_TEST_USER@"
|
||||||
#cmakedefine DBUS_TEST_EXEC "@DBUS_TEST_EXEC@"
|
#cmakedefine DBUS_TEST_EXEC "@DBUS_TEST_EXEC@"
|
||||||
/* Where to put test sockets */
|
|
||||||
#define DBUS_TEST_SOCKET_DIR "@TEST_SOCKET_DIR@"
|
|
||||||
|
|
||||||
// system type defines
|
// system type defines
|
||||||
#if defined(_WIN32) || defined(_WIN64) || defined (_WIN32_WCE)
|
#if defined(_WIN32) || defined(_WIN64) || defined (_WIN32_WCE)
|
||||||
|
|
@ -244,6 +242,11 @@
|
||||||
# define DBUS_UNIX
|
# define DBUS_UNIX
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef DBUS_UNIX
|
||||||
|
/* Where to put test sockets */
|
||||||
|
#define DBUS_TEST_SOCKET_DIR "@TEST_SOCKET_DIR@"
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(_WIN32) || defined(_WIN64)
|
#if defined(_WIN32) || defined(_WIN64)
|
||||||
// mingw mode_t
|
// mingw mode_t
|
||||||
# ifdef HAVE_STDIO_H
|
# ifdef HAVE_STDIO_H
|
||||||
|
|
|
||||||
23
meson.build
23
meson.build
|
|
@ -1078,13 +1078,19 @@ values = run_command(python, '-c',
|
||||||
values += '/tmp'
|
values += '/tmp'
|
||||||
default_socket_dir = values.strip().split('\n')[0]
|
default_socket_dir = values.strip().split('\n')[0]
|
||||||
|
|
||||||
test_socket_dir = get_option('test_socket_dir')
|
if platform_unix
|
||||||
if test_socket_dir == ''
|
test_socket_dir = get_option('test_socket_dir')
|
||||||
test_socket_dir = default_socket_dir
|
|
||||||
|
if test_socket_dir == ''
|
||||||
|
test_socket_dir = default_socket_dir
|
||||||
|
endif
|
||||||
|
|
||||||
|
config.set_quoted('DBUS_TEST_SOCKET_DIR', test_socket_dir)
|
||||||
|
test_listen = 'unix:tmpdir=' + test_socket_dir
|
||||||
|
else
|
||||||
|
test_listen = 'tcp:host=localhost'
|
||||||
endif
|
endif
|
||||||
test_listen = platform_unix ? 'unix:tmpdir=' + test_socket_dir : 'tcp:host=localhost'
|
|
||||||
config.set_quoted('TEST_LISTEN', test_listen)
|
config.set_quoted('TEST_LISTEN', test_listen)
|
||||||
config.set_quoted('DBUS_TEST_SOCKET_DIR', test_socket_dir)
|
|
||||||
data_config.set('TEST_LISTEN', test_listen)
|
data_config.set('TEST_LISTEN', test_listen)
|
||||||
|
|
||||||
session_socket_dir = get_option('session_socket_dir')
|
session_socket_dir = get_option('session_socket_dir')
|
||||||
|
|
@ -1395,9 +1401,14 @@ summary_dict += {
|
||||||
'System bus user': dbus_user,
|
'System bus user': dbus_user,
|
||||||
'Session bus services dir':
|
'Session bus services dir':
|
||||||
get_option('prefix') / get_option('datadir') / 'dbus-1' / 'services',
|
get_option('prefix') / get_option('datadir') / 'dbus-1' / 'services',
|
||||||
'Tests socket dir': test_socket_dir,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if platform_unix
|
||||||
|
summary_dict += {
|
||||||
|
'Tests socket dir': test_socket_dir,
|
||||||
|
}
|
||||||
|
endif
|
||||||
|
|
||||||
if host_os.contains('solaris')
|
if host_os.contains('solaris')
|
||||||
summary_dict += {
|
summary_dict += {
|
||||||
'Console owner file': console_owner_file,
|
'Console owner file': console_owner_file,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue