From f531e9b3d1af4da0c4df46b9e79598596f823739 Mon Sep 17 00:00:00 2001 From: Ralf Habacker Date: Wed, 4 Feb 2015 13:23:34 +0100 Subject: [PATCH] Fix cmake compile errors caused by adding new code. --- bus/driver.c | 2 +- cmake/test/CMakeLists.txt | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/bus/driver.c b/bus/driver.c index 6e8a6da..955c4d5 100644 --- a/bus/driver.c +++ b/bus/driver.c @@ -134,7 +134,7 @@ bus_driver_check_caller_is_privileged (DBusConnection *connection, } return TRUE; -#elif DBUS_WIN +#elifdef DBUS_WIN char *windows_sid = NULL; dbus_bool_t ret = FALSE; diff --git a/cmake/test/CMakeLists.txt b/cmake/test/CMakeLists.txt index 7676586..42c5604 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_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}) -- 1.8.4.5