summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake')
-rw-r--r--cmake/CMakeLists.txt6
-rw-r--r--cmake/config.h.cmake3
-rw-r--r--cmake/test/CMakeLists.txt10
-rw-r--r--cmake/tools/CMakeLists.txt4
4 files changed, 19 insertions, 4 deletions
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
index 32250f59..b997f8b1 100644
--- a/cmake/CMakeLists.txt
+++ b/cmake/CMakeLists.txt
@@ -409,8 +409,6 @@ else (WIN32)
set (DBUS_CONSOLE_AUTH_DIR "/var/run/console/")
endif (WIN32)
-set (DBUS_USER )
-
# This won't work on Windows. It's not meant to - the system bus is
# meaningless on Windows anyway.
#
@@ -429,6 +427,7 @@ if (WIN32)
set (DBUS_SESSION_CONFIG_FILE "etc/dbus-1/session.conf")
# bus-test expects a non empty string
set (DBUS_USER "Administrator")
+ set (DBUS_TEST_USER "guest")
else (WIN32)
set (DBUS_SESSION_BUS_LISTEN_ADDRESS "unix:tmpdir=${DBUS_SESSION_SOCKET_DIR}" CACHE STRING "session bus default listening address")
set (DBUS_SESSION_BUS_CONNECT_ADDRESS "autolaunch:" CACHE STRING "session bus fallback address for clients")
@@ -436,7 +435,8 @@ else (WIN32)
set (configdir ${sysconfdir}/dbus-1 )
set (DBUS_SYSTEM_CONFIG_FILE ${configdir}/system.conf)
set (DBUS_SESSION_CONFIG_FILE ${configdir}/session.conf)
- set (DBUS_USER "root")
+ set (DBUS_USER "messagebus")
+ set (DBUS_TEST_USER "nobody")
endif (WIN32)
set (DBUS_DAEMON_NAME "dbus-daemon" CACHE STRING "The name of the dbus daemon executable")
diff --git a/cmake/config.h.cmake b/cmake/config.h.cmake
index e8b0bc58..f7180528 100644
--- a/cmake/config.h.cmake
+++ b/cmake/config.h.cmake
@@ -204,6 +204,9 @@
#cmakedefine FD_SETSIZE @FD_SETSIZE@
+#cmakedefine DBUS_USER "@DBUS_USER@"
+#cmakedefine DBUS_TEST_USER "@DBUS_TEST_USER@"
+
// system type defines
#if defined(_WIN32) || defined(_WIN64) || defined (_WIN32_WCE)
# define DBUS_WIN
diff --git a/cmake/test/CMakeLists.txt b/cmake/test/CMakeLists.txt
index 7676586e..477beb40 100644
--- a/cmake/test/CMakeLists.txt
+++ b/cmake/test/CMakeLists.txt
@@ -72,6 +72,13 @@ add_test_executable(manual-tcp ${manual-tcp_SOURCES} ${DBUS_INTERNAL_LIBRARIES})
if(DBUS_WITH_GLIB)
message(STATUS "with glib test apps")
+
+ add_library(dbus-testutils-glib STATIC
+ ${CMAKE_SOURCE_DIR}/../test/test-utils-glib.h
+ ${CMAKE_SOURCE_DIR}/../test/test-utils-glib.c
+ )
+ target_link_libraries(dbus-testutils-glib dbus-testutils ${DBUS_INTERNAL_LIBRARIES})
+
add_definitions(
${GLIB2_DEFINITIONS}
${GOBJECT_DEFINITIONS}
@@ -80,7 +87,8 @@ if(DBUS_WITH_GLIB)
${GLIB2_INCLUDE_DIR}
${GOBJECT_INCLUDE_DIR}
)
- set(TEST_LIBRARIES ${DBUS_INTERNAL_LIBRARIES} dbus-testutils ${GLIB2_LIBRARIES} ${GOBJECT_LIBRARIES})
+
+ set(TEST_LIBRARIES ${DBUS_INTERNAL_LIBRARIES} dbus-testutils dbus-testutils-glib ${GLIB2_LIBRARIES} ${GOBJECT_LIBRARIES})
add_test_executable(test-corrupt ${CMAKE_SOURCE_DIR}/../test/corrupt.c ${TEST_LIBRARIES})
add_test_executable(test-dbus-daemon ${CMAKE_SOURCE_DIR}/../test/dbus-daemon.c ${TEST_LIBRARIES})
diff --git a/cmake/tools/CMakeLists.txt b/cmake/tools/CMakeLists.txt
index 9f363b7a..d4eeb708 100644
--- a/cmake/tools/CMakeLists.txt
+++ b/cmake/tools/CMakeLists.txt
@@ -1,3 +1,5 @@
+add_definitions("-DDBUS_COMPILATION")
+
set (dbus_send_SOURCES
../../tools/dbus-print-message.c
../../tools/dbus-print-message.h
@@ -8,6 +10,8 @@ set (dbus_monitor_SOURCES
../../tools/dbus-monitor.c
../../tools/dbus-print-message.c
../../tools/dbus-print-message.h
+ ../../tools/tool-common.c
+ ../../tools/tool-common.h
)
if (WIN32)