Index: kalarm/CMakeLists.txt
===================================================================
--- kalarm/CMakeLists.txt	(wersja 762193)
+++ kalarm/CMakeLists.txt	(kopia robocza)
@@ -94,13 +94,17 @@
 qt4_add_dbus_adaptor( kalarm_bin_SRCS org.kde.kalarm.kalarm.xml dbushandler.h DBusHandler )
 qt4_add_dbus_adaptor( kalarm_bin_SRCS org.kde.kalarm.notify.xml daemon_p.h NotificationHandler )
 qt4_add_dbus_interfaces(kalarm_bin_SRCS kalarmd/org.kde.kalarm.kalarmd.Daemon.xml )
-qt4_add_dbus_interfaces(kalarm_bin_SRCS ${CMAKE_BINARY_DIR}/kmail/org.kde.kmail.kmail.xml )
+if (KMAIL_SUPPORTED)
+   qt4_add_dbus_interfaces(kalarm_bin_SRCS ${CMAKE_BINARY_DIR}/kmail/org.kde.kmail.kmail.xml )
+endif (KMAIL_SUPPORTED)
 
 kde4_add_kcfg_files(kalarm_bin_SRCS GENERATE_MOC kalarmconfig.kcfgc)
 
 if (UNIX)
 kde4_add_executable(kalarm_bin ${kalarm_bin_SRCS})
-add_dependencies(kalarm_bin kmail_xml)
+if (KMAIL_SUPPORTED)
+   add_dependencies(kalarm_bin kmail_xml)
+endif (KMAIL_SUPPORTED)
 
 set_target_properties(kalarm_bin PROPERTIES OUTPUT_NAME kalarm)
 
Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt	(wersja 762193)
+++ CMakeLists.txt	(kopia robocza)
@@ -152,6 +152,7 @@
   macro_optional_add_subdirectory(knode)
 
   if(QGPGME_FOUND)
+    set(KMAIL_SUPPORTED)
     macro_optional_add_subdirectory(kmail)
     add_subdirectory(plugins)
   endif(QGPGME_FOUND)
Index: kontact/plugins/summary/CMakeLists.txt
===================================================================
--- kontact/plugins/summary/CMakeLists.txt	(wersja 762193)
+++ kontact/plugins/summary/CMakeLists.txt	(kopia robocza)
@@ -9,11 +9,15 @@
 
 set(kontact_summaryplugin_PART_SRCS summaryview_plugin.cpp summaryview_part.cpp dropwidget.cpp )
 
-qt4_add_dbus_interfaces(kontact_summaryplugin_PART_SRCS ${CMAKE_BINARY_DIR}/kmail/org.kde.kmail.kmail.xml)
+if(KMAIL_SUPPORTED)
+   qt4_add_dbus_interfaces(kontact_summaryplugin_PART_SRCS ${CMAKE_BINARY_DIR}/kmail/org.kde.kmail.kmail.xml)
+endif(KMAIL_SUPPORTED)
 
 
 kde4_add_plugin(kontact_summaryplugin ${kontact_summaryplugin_PART_SRCS})
-add_dependencies(kontact_summaryplugin kmail_xml)
+if(KMAIL_SUPPORTED)
+   add_dependencies(kontact_summaryplugin kmail_xml)
+endif(KMAIL_SUPPORTED)
 
 
 
Index: kontact/plugins/CMakeLists.txt
===================================================================
--- kontact/plugins/CMakeLists.txt	(wersja 762193)
+++ kontact/plugins/CMakeLists.txt	(kopia robocza)
@@ -1,12 +1,15 @@
 
-add_subdirectory( kaddressbook ) 
+if(KMAIL_SUPPORTED)
+  add_subdirectory( kaddressbook ) 
+endif(KMAIL_SUPPORTED)
+
 if(QGPGME_FOUND)
-if(NOT WIN32)
-add_subdirectory( kmail ) 
-endif(NOT WIN32)
-add_subdirectory( korganizer )
-add_subdirectory( summary )
-add_subdirectory( specialdates )
+  if(KMAIL_SUPPORTED)
+    add_subdirectory( kmail ) 
+  endif(KMAIL_SUPPORTED)
+  add_subdirectory( korganizer )
+  add_subdirectory( summary )
+  add_subdirectory( specialdates )
 endif(QGPGME_FOUND)
 add_subdirectory( knotes ) 
 add_subdirectory( knode ) 
Index: korganizer/CMakeLists.txt
===================================================================
--- korganizer/CMakeLists.txt	(wersja 762193)
+++ korganizer/CMakeLists.txt	(kopia robocza)
@@ -92,12 +92,16 @@
 
 
 qt4_add_dbus_interfaces(korganizer_eventviewer_LIB_SRCS org.kde.korganizer.Korganizer.xml)
-qt4_add_dbus_interfaces(korganizer_eventviewer_LIB_SRCS ${CMAKE_BINARY_DIR}/kmail/org.kde.kmail.kmail.xml)
+if(KMAIL_SUPPORTED)
+   qt4_add_dbus_interfaces(korganizer_eventviewer_LIB_SRCS ${CMAKE_BINARY_DIR}/kmail/org.kde.kmail.kmail.xml)
+endif(KMAIL_SUPPORTED)
 qt4_add_dbus_interfaces(korganizer_eventviewer_LIB_SRCS ${CMAKE_SOURCE_DIR}/knode/org.kde.knode.xml)
 qt4_add_dbus_interfaces(korganizer_eventviewer_LIB_SRCS ${CMAKE_SOURCE_DIR}/kaddressbook/org.kde.KAddressbook.Core.xml)
 
 kde4_add_library(korganizer_eventviewer SHARED ${korganizer_eventviewer_LIB_SRCS})
-add_dependencies(korganizer_eventviewer kmail_xml)
+if(KMAIL_SUPPORTED)
+   add_dependencies(korganizer_eventviewer kmail_xml)
+endif(KMAIL_SUPPORTED)
 
 target_link_libraries(korganizer_eventviewer ${KDE4_KPARTS_LIBS} ${KDE4_KCAL_LIBS})
 
@@ -209,11 +213,15 @@
 qt4_add_dbus_adaptor(korganizerprivate_LIB_SRCS org.kde.korganizer.Korganizer.xml korganizerifaceimpl.h KOrganizerIfaceImpl )
 qt4_add_dbus_adaptor(korganizerprivate_LIB_SRCS org.kde.Korganizer.Calendar.xml actionmanager.h ActionManager )
 qt4_add_dbus_interfaces(korganizerprivate_LIB_SRCS org.kde.korganizer.Korganizer.xml )
-qt4_add_dbus_interfaces(korganizerprivate_LIB_SRCS ${CMAKE_BINARY_DIR}/kmail/org.kde.kmail.kmail.xml)
+if(KMAIL_SUPPORTED)
+   qt4_add_dbus_interfaces(korganizerprivate_LIB_SRCS ${CMAKE_BINARY_DIR}/kmail/org.kde.kmail.kmail.xml)
+endif(KMAIL_SUPPORTED)
 
 kde4_add_library(korganizerprivate SHARED ${korganizerprivate_LIB_SRCS})
 
-add_dependencies(korganizerprivate kmail)
+if(KMAIL_SUPPORTED)
+   add_dependencies(korganizerprivate kmail)
+endif(KMAIL_SUPPORTED)
 
 target_link_libraries(korganizerprivate ${KDE4_KNEWSTUFF2_LIBS} ${KDE4_KABC_LIBRARY} ${KDE4_KUTILS_LIBRARY} ${KDE4_KCAL_LIBRARY} ${KDE4_KPIMIDENTITIES_LIBRARY} ${KDE4_KMIME_LIBRARY}
                                                       kdepim korganizer_eventviewer korganizer_calendar kocorehelper
