Index: FindKDEWIN32.cmake
===================================================================
--- FindKDEWIN32.cmake	(revision 841519)
+++ FindKDEWIN32.cmake	(working copy)
@@ -25,18 +25,31 @@
       ${CMAKE_INCLUDE_PATH}
       ${CMAKE_INSTALL_PREFIX}/include
     )
- 
+    if (CMAKE_BUILD_TYPE STREQUAL "Debug")
+        set (LIBRARY_NAME kdewin32d)
+    else (CMAKE_BUILD_TYPE STREQUAL "Debug")
+        set (LIBRARY_NAME kdewin32)
+    endif (CMAKE_BUILD_TYPE STREQUAL "Debug")
+    
     # search for kdewin32 in the default install directory for applications (default of (n)make install)
     FILE(TO_CMAKE_PATH "${CMAKE_LIBRARY_PATH}" _cmakeLibraryPathCmakeStyle)
-    find_library_with_debug(KDEWIN32_LIBRARY
-      WIN32_DEBUG_POSTFIX d
-      NAMES kdewin32
+    find_library(KDEWIN32_LIBRARY
+      NAMES ${LIBRARY_NAME}
       PATHS 
         ${_cmakeLibraryPathCmakeStyle}
         ${CMAKE_INSTALL_PREFIX}/lib
       NO_SYSTEM_ENVIRONMENT_PATH
     )
 
+    #    find_library_with_debug(KDEWIN32_LIBRARY
+#      WIN32_DEBUG_POSTFIX d
+#      NAMES kdewin32
+#      PATHS 
+#        ${_cmakeLibraryPathCmakeStyle}
+#        ${CMAKE_INSTALL_PREFIX}/lib
+#      NO_SYSTEM_ENVIRONMENT_PATH
+#    )
+
     # kdelibs/win/ has to be built before the rest of kdelibs/
     # eventually it will be moved out from kdelibs/
     if (KDEWIN32_LIBRARY AND KDEWIN32_INCLUDE_DIR)