remove the debug postfix for the executables, it only makes sense for the lib
authorRomain Pokrzywka <romain@kdab.com>
Wed, 3 Feb 2010 19:32:37 +0000 (11:32 -0800)
committerRalf Habacker <ralf.habacker@freenet.de>
Sat, 6 Feb 2010 23:32:45 +0000 (00:32 +0100)
cmake/CMakeLists.txt
cmake/bus/CMakeLists.txt
cmake/tools/CMakeLists.txt

index 03fa1dd..b667bd2 100644 (file)
@@ -71,48 +71,44 @@ if(VCS)
        set(DBUS_VERBOSE_C_S 1)
 endif(VCS)
 
-if(MSVC)
-       # controll folders in msvc projects
-       include(ProjectSourceGroup)
-       if(NOT GROUP_CODE)
-               #set(GROUP_CODE split) #cmake default
-               set(GROUP_CODE flat)
-       endif(NOT GROUP_CODE)
-       ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE)
-
-
-       # Use the highest warning level
-       if (WALL)
-               set(WALL 1 CACHE TYPE STRING FORCE)
-               set(CMAKE_CXX_WARNING_LEVEL 4 CACHE TYPE STRING FORCE)
-
-               if(CMAKE_CXX_FLAGS MATCHES "/W[0-4]")
-                       STRING(REGEX REPLACE "/W[0-4]" "/W4" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
-               else(CMAKE_CXX_FLAGS MATCHES "/W[0-4]")
-                       SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4")
-               endif(CMAKE_CXX_FLAGS MATCHES "/W[0-4]")
-
-               if(CMAKE_C_FLAGS MATCHES "/W[0-4]")
-                       STRING(REGEX REPLACE "/W[0-4]" "/W4" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
-               else(CMAKE_C_FLAGS MATCHES "/W[0-4]")
-                       SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W4")
-               endif(CMAKE_C_FLAGS MATCHES "/W[0-4]")
-       else (WALL)
-               set(CMAKE_CXX_WARNING_LEVEL 3 CACHE TYPE STRING FORCE)
-       endif (WALL)
-
-       SET(MSVC_W_ERROR   " /we4028 /we4013 /we4133 /we4047 /we4031 /we4002 /we4003 /we4114")
-       SET(MSVC_W_DISABLE " /wd4127 /wd4090 /wd4101 /wd4244")
-
-       SET(CMAKE_C_FLAGS_DEBUG   "${CMAKE_C_FLAGS_DEBUG}   /FIconfig.h ${MSVC_W_ERROR} ${MSVC_W_DISABLE}")
-       SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /FIconfig.h ${MSVC_W_ERROR} ${MSVC_W_DISABLE}")
-
-   # used by executables, CMAKE_DEBUG_POSTFIX does not handle this case
-   #set (CMAKE_EXE_POSTFIX "d")
-
-endif(MSVC)
 if(WIN32)
-  set (CMAKE_DEBUG_POSTFIX "d")
+       set(CMAKE_DEBUG_POSTFIX "d")
+       if(MSVC)
+               # controll folders in msvc projects
+               include(ProjectSourceGroup)
+               if(NOT GROUP_CODE)
+                       #set(GROUP_CODE split) #cmake default
+                       set(GROUP_CODE flat)
+               endif(NOT GROUP_CODE)
+               ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE)
+
+
+               # Use the highest warning level
+               if (WALL)
+                       set(WALL 1 CACHE TYPE STRING FORCE)
+                       set(CMAKE_CXX_WARNING_LEVEL 4 CACHE TYPE STRING FORCE)
+
+                       if(CMAKE_CXX_FLAGS MATCHES "/W[0-4]")
+                               STRING(REGEX REPLACE "/W[0-4]" "/W4" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
+                       else(CMAKE_CXX_FLAGS MATCHES "/W[0-4]")
+                               SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4")
+                       endif(CMAKE_CXX_FLAGS MATCHES "/W[0-4]")
+
+                       if(CMAKE_C_FLAGS MATCHES "/W[0-4]")
+                               STRING(REGEX REPLACE "/W[0-4]" "/W4" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
+                       else(CMAKE_C_FLAGS MATCHES "/W[0-4]")
+                               SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W4")
+                       endif(CMAKE_C_FLAGS MATCHES "/W[0-4]")
+               else (WALL)
+                       set(CMAKE_CXX_WARNING_LEVEL 3 CACHE TYPE STRING FORCE)
+               endif (WALL)
+
+               SET(MSVC_W_ERROR   " /we4028 /we4013 /we4133 /we4047 /we4031 /we4002 /we4003 /we4114")
+               SET(MSVC_W_DISABLE " /wd4127 /wd4090 /wd4101 /wd4244")
+
+               SET(CMAKE_C_FLAGS_DEBUG   "${CMAKE_C_FLAGS_DEBUG}   /FIconfig.h ${MSVC_W_ERROR} ${MSVC_W_DISABLE}")
+               SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /FIconfig.h ${MSVC_W_ERROR} ${MSVC_W_DISABLE}")
+       endif(MSVC)
 endif(WIN32)
 
 SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}  -D_DEBUG")
@@ -472,6 +468,8 @@ else (WIN32)
 endif (WIN32)
 
 set (DAEMON_NAME dbus-daemon)
+add_definitions( -DDBUS_DAEMON_EXECUTABLE_NAME=\\"dbus-daemon\\" )
+
 
 ########### create config.h ###############
 
index a14e1a5..0473eb2 100644 (file)
@@ -81,9 +81,6 @@ set(DBUS_LIBRARIES dbus-1 dbus-internal)
 
 add_executable(dbus-daemon ${BUS_SOURCES} ${BUS_DIR}/main.c)
 target_link_libraries(dbus-daemon ${DBUS_LIBRARIES} ${XML_LIBRARY})
-if(WIN32 AND NOT DBUS_DISABLE_EXECUTABLE_DEBUG_POSTFIX)
-    set_target_properties(dbus-daemon PROPERTIES DEBUG_POSTFIX "d")
-endif(WIN32 AND NOT DBUS_DISABLE_EXECUTABLE_DEBUG_POSTFIX)
 
 install_targets(/bin dbus-daemon)
 install_files(/etc FILES ${config_DATA})
@@ -99,9 +96,6 @@ if (DBUS_SERVICE)
        add_executable(dbus-service ${dbus_service_SOURCES} )
        target_link_libraries(dbus-service ${DBUS_LIBRARIES} ${XML_LIBRARY})
        install_targets(/bin dbus-service )
-       if(WIN32)
-          set_target_properties(dbus-service PROPERTIES DEBUG_POSTFIX d)
-    endif(WIN32)
 endif (DBUS_SERVICE)
 
 if (DBUS_BUILD_TESTS)  
index 4d62119..1068074 100644 (file)
@@ -57,7 +57,3 @@ install_targets(/bin dbus-launch )
 add_executable(dbus-monitor ${dbus_monitor_SOURCES})
 target_link_libraries(dbus-monitor ${DBUS_LIBRARIES})
 install_targets(/bin dbus-monitor )
-
-if(WIN32)
-  set_target_properties(dbus-send dbus-launch dbus-monitor PROPERTIES DEBUG_POSTFIX d)
-endif(WIN32)
\ No newline at end of file