* cmake: added debug postfixes to debug exe's for easier debugging.
authorRalf Habacker <ralf.habacker@freenet.de>
Thu, 26 Apr 2007 09:30:38 +0000 (09:30 +0000)
committerRalf Habacker <ralf.habacker@freenet.de>
Thu, 26 Apr 2007 09:30:38 +0000 (09:30 +0000)
* dbus\dbus-sysdeps-win.c (_dbus_win_set_error_from_win_error): print error code in case no string message is available.

ChangeLog
cmake/CMakeLists.txt
cmake/bus/CMakeLists.txt
cmake/dbus/CMakeLists.txt
cmake/tools/CMakeLists.txt
dbus/dbus-sysdeps-win.c

index beb0bd5..7c50d8a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2007-04-26 Ralf.Habacker  <ralf.habacker@freenet.de>
+
+       * cmake: added debug postfixes to debug exe's for 
+       easier debugging.
+       * dbus\dbus-sysdeps-win.c (_dbus_win_set_error_from_win_error): 
+       print error code in case no string message is available.
+
 2007-04-06 Simon McVittie <simon.mcvittie@collabora.co.uk>
 
        * dbus/dbus-message-util.c, dbus/dbus-message.c,
index ccd63e0..1b5249c 100644 (file)
@@ -1,6 +1,6 @@
 set (PACKAGE dbus)
 set (VERSION_MAJOR "1")
-set (VERSION_MINOR "0")
+set (VERSION_MINOR "1")
 set (VERSION_PATCH "0")
 set (VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH} )
 project(${PACKAGE})
@@ -75,6 +75,11 @@ if(MSVC)
        SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /FIconfig.h ${MSVC_W_ERROR} ${MSVC_W_DISABLE}")
 endif(MSVC)
 
+if(CMAKE_BUILD_TYPE STREQUAL "Debug")
+   # dll postfix is set to 'd' by default
+   set (CMAKE_EXE_POSTFIX "d")
+endif(CMAKE_BUILD_TYPE STREQUAL "Debug")
+
 
 #########################################################################
 # Windows CE
index dfef959..c6e6c3e 100644 (file)
@@ -82,9 +82,9 @@ set (dbus_daemon_SOURCES
 include_directories(${XML_INCLUDE_DIR})
 SET (LIBS ${XML_LIBRARY})
 
-add_executable(dbus-daemon ${dbus_daemon_SOURCES})
-target_link_libraries(dbus-daemon dbus-1 ${LIBS})
-install_targets(/bin dbus-daemon )
+add_executable(dbus-daemon${CMAKE_EXE_POSTFIX} ${dbus_daemon_SOURCES})
+target_link_libraries(dbus-daemon${CMAKE_EXE_POSTFIX} dbus-1 ${LIBS})
+install_targets(/bin dbus-daemon${CMAKE_EXE_POSTFIX} )
 install_files(/etc FILES ${config_DATA})
 
 if (DBUS_SERVICE)
@@ -95,9 +95,9 @@ if (DBUS_SERVICE)
        #       ${BUS_SOURCES} 
        )
 
-       add_executable(dbus-service ${dbus_service_SOURCES} )
-       target_link_libraries(dbus-service dbus-1 ${LIBS})
-       install_targets(/bin dbus-service )
+       add_executable(dbus-service${CMAKE_EXE_POSTFIX} ${dbus_service_SOURCES} )
+       target_link_libraries(dbus-service${CMAKE_EXE_POSTFIX} dbus-1 ${LIBS})
+       install_targets(/bin dbus-service${CMAKE_EXE_POSTFIX} )
 
 endif (DBUS_SERVICE)
 
@@ -121,10 +121,10 @@ set (bus_test_SOURCES
 )
 
 if (DBUS_BUILD_TESTS)  
-       add_executable(bus-test ${bus_test_SOURCES})
-       target_link_libraries(bus-test dbus-1 ${LIBS} )
-       install_targets(/bin bus-test)
-       add_test(bus-test ${EXECUTABLE_OUTPUT_PATH}/bus-test ${CMAKE_SOURCE_DIR}/../test/data)
+       add_executable(bus-test${CMAKE_EXE_POSTFIX} ${bus_test_SOURCES})
+       target_link_libraries(bus-test${CMAKE_EXE_POSTFIX} dbus-1 ${LIBS} )
+       install_targets(/bin bus-test${CMAKE_EXE_POSTFIX})
+       add_test(bus-test ${EXECUTABLE_OUTPUT_PATH}/bus-test${CMAKE_EXE_POSTFIX} ${CMAKE_SOURCE_DIR}/../test/data)
 endif (DBUS_BUILD_TESTS)
 
 if(MSVC)
index 79bf656..4957b13 100644 (file)
@@ -234,10 +234,10 @@ install_files(/include/dbus FILES ${dbusinclude_HEADERS})
 
 if (DBUS_BUILD_TESTS)
        set (TESTS_ENVIRONMENT "DBUS_TEST_DATA=${CMAKE_SOURCE_DIR}/test/data DBUS_TEST_HOMEDIR=${CMAKE_BUILD_DIR}/dbus")
-       ADD_EXECUTABLE(dbus-test  ${CMAKE_SOURCE_DIR}/../dbus/dbus-test-main.c)
-       target_link_libraries(dbus-test dbus-1 ${LIBS})
-       add_test(dbus-test ${EXECUTABLE_OUTPUT_PATH}/dbus-test ${CMAKE_SOURCE_DIR}/../test/data)
-       install_targets(/bin dbus-test)
+       ADD_EXECUTABLE(dbus-test${CMAKE_EXE_POSTFIX}  ${CMAKE_SOURCE_DIR}/../dbus/dbus-test-main.c)
+       target_link_libraries(dbus-test${CMAKE_EXE_POSTFIX} dbus-1 ${LIBS})
+       add_test(dbus-test${CMAKE_EXE_POSTFIX} ${EXECUTABLE_OUTPUT_PATH}/dbus-test ${CMAKE_SOURCE_DIR}/../test/data)
+       install_targets(/bin dbus-test${CMAKE_EXE_POSTFIX})
 ENDIF (DBUS_BUILD_TESTS)
 
 if (UNIX)
index 214d19b..c5568cb 100644 (file)
@@ -54,16 +54,16 @@ set (dbus_viewer_SOURCES
        ../../tools/dbus-viewer.c
 )
 
-add_executable(dbus-send ${dbus_send_SOURCES})
-target_link_libraries(dbus-send dbus-1)
-install_targets(/bin dbus-send )
+add_executable(dbus-send${CMAKE_EXE_POSTFIX} ${dbus_send_SOURCES})
+target_link_libraries(dbus-send${CMAKE_EXE_POSTFIX} dbus-1)
+install_targets(/bin dbus-send${CMAKE_EXE_POSTFIX} )
 
 # glib required 
-#add_executable(dbus_launch ${dbus_launch_SOURCES})
+#add_executable(dbus_launch${CMAKE_EXE_POSTFIX} ${dbus_launch_SOURCES})
 
-add_executable(dbus-monitor ${dbus_monitor_SOURCES})
-target_link_libraries(dbus-monitor dbus-1)
-install_targets(/bin dbus-monitor )
+add_executable(dbus-monitor${CMAKE_EXE_POSTFIX} ${dbus_monitor_SOURCES})
+target_link_libraries(dbus-monitor${CMAKE_EXE_POSTFIX} dbus-1)
+install_targets(/bin dbus-monitor${CMAKE_EXE_POSTFIX} )
 
 #dbus_send_LDADD= $(top_builddir)/dbus/libdbus-1.la
 #dbus_monitor_LDADD= $(top_builddir)/glib/libdbus-glib-1.la
index b86c977..08ac6a0 100644 (file)
@@ -2510,7 +2510,7 @@ _dbus_win_set_error_from_win_error (DBusError *error,
       dbus_set_error (error, "win32.error", "%s", msg_copy);
     }
   else
-    dbus_set_error_const (error, "win32.error", "Unknown error code or FormatMessage failed");
+    dbus_set_error (error, "win32.error", "Unknown error code %d or FormatMessage failed", code);
 }
 
 void