Index: kalarm/CMakeLists.txt
===================================================================
--- kalarm/CMakeLists.txt	(wersja 763037)
+++ 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 763037)
+++ CMakeLists.txt	(kopia robocza)
@@ -152,6 +152,7 @@
   macro_optional_add_subdirectory(knode)
 
   if(QGPGME_FOUND)
+    set(KMAIL_SUPPORTED 1)
     macro_optional_add_subdirectory(kmail)
     add_subdirectory(plugins)
   endif(QGPGME_FOUND)
@@ -172,7 +173,7 @@
   macro_optional_add_subdirectory(console)
   macro_optional_add_subdirectory(kontact)
 
-  if(QGPGME_FOUND)
+  if(QGPGME_FOUND AND ${KMAIL_SUPPORTED})
      macro_optional_add_subdirectory(korganizer)
   endif(QGPGME_FOUND)
 
Index: kontact/plugins/summary/CMakeLists.txt
===================================================================
--- kontact/plugins/summary/CMakeLists.txt	(wersja 763037)
+++ 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 763037)
+++ 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: akonadi/agents/mailthreader/CMakeLists.txt
===================================================================
--- akonadi/agents/mailthreader/CMakeLists.txt	(wersja 763037)
+++ akonadi/agents/mailthreader/CMakeLists.txt	(kopia robocza)
@@ -22,7 +22,7 @@
 
 kde4_add_executable(akonadi_mailthreader_agent RUN_UNINSTALLED ${mailthreaderagent_SRCS})
 
-kdepim4_link_unique_libraries(akonadi_mailthreader_agent akonadi ${QT_QTCORE_LIBRARIES} ${QT_QTDBUS_LIBRARIES}  ${STRIGIQTDBUSCLIENT_LIBRARY} ${KDE4_KDECORE_LIBS} ${KDE4_KABC_LIBS} ${KDE4_KIO_LIBRARY} ${KDE4_KMIME_LIBS} )
+kdepim4_link_unique_libraries(akonadi_mailthreader_agent akonadi ${QT_QTCORE_LIBRARY} ${QT_QTDBUS_LIBRARY}  ${STRIGIQTDBUSCLIENT_LIBRARY} ${KDE4_KDECORE_LIBS} ${KDE4_KABC_LIBS} ${KDE4_KIO_LIBRARY} ${KDE4_KMIME_LIBS} )
 
 install(TARGETS akonadi_mailthreader_agent DESTINATION ${BIN_INSTALL_DIR})
 install( FILES mailthreaderagent.desktop DESTINATION "${CMAKE_INSTALL_PREFIX}/share/akonadi/agents" )
Index: akonadi/agents/nepomukfeeder/CMakeLists.txt
===================================================================
--- akonadi/agents/nepomukfeeder/CMakeLists.txt	(wersja 763037)
+++ akonadi/agents/nepomukfeeder/CMakeLists.txt	(kopia robocza)
@@ -10,10 +10,10 @@
 
 target_link_libraries(akonadi_nepomuk_feeder
   akonadi
-  ${QT_QTCORE_LIBRARIES}
-  ${QT_QTDBUS_LIBRARIES}
+  ${QT_QTCORE_LIBRARY}
+  ${QT_QTDBUS_LIBRARY}
   ${KDE4_KMIME_LIBS}
-  ${NEPOMUK_LIBRARIES}
+  ${NEPOMUK_LIBRARY}
 )
 
 install(TARGETS akonadi_nepomuk_feeder DESTINATION ${BIN_INSTALL_DIR})
Index: akonadi/agents/strigifeeder/CMakeLists.txt
===================================================================
--- akonadi/agents/strigifeeder/CMakeLists.txt	(wersja 763037)
+++ akonadi/agents/strigifeeder/CMakeLists.txt	(kopia robocza)
@@ -16,8 +16,8 @@
 kde4_add_executable(akonadi_strigi_feeder RUN_UNINSTALLED strigifeeder.cpp)
 target_link_libraries(akonadi_strigi_feeder
   akonadi
-  ${QT_QTCORE_LIBRARIES}
-  ${QT_QTDBUS_LIBRARIES}
+  ${QT_QTCORE_LIBRARY}
+  ${QT_QTDBUS_LIBRARY}
   ${STRIGIQTDBUSCLIENT_LIBRARY}
 )
 
Index: akonadi/libakonadi/CMakeLists.txt
===================================================================
--- akonadi/libakonadi/CMakeLists.txt	(wersja 763037)
+++ akonadi/libakonadi/CMakeLists.txt	(kopia robocza)
@@ -105,7 +105,7 @@
 
 kde4_add_library( akonadi SHARED ${akonadi_LIB_SRC} )
 
-target_link_libraries( akonadi ${QT_QTNETWORK_LIBRARY} ${QT_QTDBUS_LIBRARIES} ${KDE4_KDEUI_LIBS} kdepim akonadiprotocol)
+target_link_libraries( akonadi ${QT_QTNETWORK_LIBRARY} ${QT_QTDBUS_LIBRARY} ${KDE4_KDEUI_LIBS} kdepim akonadiprotocol)
 set_target_properties( akonadi PROPERTIES VERSION ${GENERIC_LIB_VERSION} SOVERSION ${GENERIC_LIB_SOVERSION} )
 install(TARGETS akonadi  DESTINATION ${LIB_INSTALL_DIR})
 
Index: akonadi/clients/akonadi/CMakeLists.txt
===================================================================
--- akonadi/clients/akonadi/CMakeLists.txt	(wersja 763037)
+++ akonadi/clients/akonadi/CMakeLists.txt	(kopia robocza)
@@ -9,6 +9,6 @@
 set_target_properties(akonadi_bin PROPERTIES OUTPUT_NAME akonadi)
 
 target_link_libraries( akonadi_bin akonadi
-  ${QT_QTCORE_LIBRARIES} )
+  ${QT_QTCORE_LIBRARY} )
 
 install(TARGETS akonadi_bin DESTINATION ${BIN_INSTALL_DIR} )
Index: akonadi/clients/akonadiconsole/CMakeLists.txt
===================================================================
--- akonadi/clients/akonadiconsole/CMakeLists.txt	(wersja 763037)
+++ akonadi/clients/akonadiconsole/CMakeLists.txt	(kopia robocza)
@@ -29,6 +29,6 @@
 kde4_add_executable(akonadiconsole_bin ${akonadiconsole_bin_SRCS})
 set_target_properties(akonadiconsole_bin PROPERTIES OUTPUT_NAME akonadiconsole)
 
-target_link_libraries( akonadiconsole_bin akonadicomponents kabcakonadi kmimeakonadi kdepim ${KDE4_KDEUI_LIBRARY} )
+target_link_libraries( akonadiconsole_bin akonadi akonadicomponents kabcakonadi kmimeakonadi kdepim ${KDE4_KDEUI_LIBRARY} )
 
 install(TARGETS akonadiconsole_bin DESTINATION ${BIN_INSTALL_DIR} )
Index: akonadi/resources/nntp/CMakeLists.txt
===================================================================
--- akonadi/resources/nntp/CMakeLists.txt	(wersja 763037)
+++ akonadi/resources/nntp/CMakeLists.txt	(kopia robocza)
@@ -21,6 +21,6 @@
 kde4_add_kcfg_files(nntpresource_SRCS settingsbase.kcfgc)
 kde4_add_executable(akonadi_nntp_resource RUN_UNINSTALLED ${nntpresource_SRCS})
 
-target_link_libraries(akonadi_nntp_resource akonadi ${QT_QTCORE_LIBRARIES} ${QT_QTDBUS_LIBRARIES} ${KDE4_KDECORE_LIBS} ${KDE4_KIO_LIBRARY} ${KDE4_KMIME_LIBS})
+target_link_libraries(akonadi_nntp_resource akonadi ${QT_QTCORE_LIBRARY} ${QT_QTDBUS_LIBRARY} ${KDE4_KDECORE_LIBS} ${KDE4_KIO_LIBRARY} ${KDE4_KMIME_LIBS})
 
 install(TARGETS akonadi_nntp_resource DESTINATION ${BIN_INSTALL_DIR})
Index: akonadi/resources/vcard/CMakeLists.txt
===================================================================
--- akonadi/resources/vcard/CMakeLists.txt	(wersja 763037)
+++ akonadi/resources/vcard/CMakeLists.txt	(kopia robocza)
@@ -19,6 +19,6 @@
 
 kde4_add_executable(akonadi_vcard_resource RUN_UNINSTALLED ${vcardresource_SRCS})
 
-target_link_libraries(akonadi_vcard_resource akonadi ${QT_QTCORE_LIBRARIES} ${QT_QTDBUS_LIBRARIES} ${KDE4_KDECORE_LIBS} ${KDE4_KABC_LIBS} ${KDE4_KIO_LIBRARY})
+target_link_libraries(akonadi_vcard_resource akonadi ${QT_QTCORE_LIBRARY} ${QT_QTDBUS_LIBRARY} ${KDE4_KDECORE_LIBS} ${KDE4_KABC_LIBS} ${KDE4_KIO_LIBRARY})
 
 install(TARGETS akonadi_vcard_resource DESTINATION ${BIN_INSTALL_DIR})
Index: akonadi/resources/knut/CMakeLists.txt
===================================================================
--- akonadi/resources/knut/CMakeLists.txt	(wersja 763037)
+++ akonadi/resources/knut/CMakeLists.txt	(kopia robocza)
@@ -20,7 +20,7 @@
 
 kde4_add_executable(akonadi_knut_resource RUN_UNINSTALLED ${knutresource_SRCS})
 
-target_link_libraries(akonadi_knut_resource akonadi ${QT_QTCORE_LIBRARIES} ${QT_QTDBUS_LIBRARIES} ${KDE4_KABC_LIBS} ${KDE4_KCAL_LIBS})
+target_link_libraries(akonadi_knut_resource akonadi ${QT_QTCORE_LIBRARY} ${QT_QTDBUS_LIBRARY} ${KDE4_KABC_LIBS} ${KDE4_KCAL_LIBS})
 
 install(TARGETS akonadi_knut_resource DESTINATION ${BIN_INSTALL_DIR})
 
Index: akonadi/resources/maildir/CMakeLists.txt
===================================================================
--- akonadi/resources/maildir/CMakeLists.txt	(wersja 763037)
+++ akonadi/resources/maildir/CMakeLists.txt	(kopia robocza)
@@ -21,7 +21,7 @@
 
 kde4_add_executable(akonadi_maildir_resource RUN_UNINSTALLED ${maildirresource_SRCS})
 
-target_link_libraries(akonadi_maildir_resource akonadi maildir ${QT_QTDBUS_LIBRARIES} ${KDE4_KIO_LIBRARY} ${KDE4_KMIME_LIBS})
+target_link_libraries(akonadi_maildir_resource akonadi maildir ${QT_QTDBUS_LIBRARY} ${KDE4_KIO_LIBRARY} ${KDE4_KMIME_LIBS})
 
 install(TARGETS akonadi_maildir_resource DESTINATION ${BIN_INSTALL_DIR})
 
Index: akonadi/resources/localbookmarks/CMakeLists.txt
===================================================================
--- akonadi/resources/localbookmarks/CMakeLists.txt	(wersja 763037)
+++ akonadi/resources/localbookmarks/CMakeLists.txt	(kopia robocza)
@@ -20,7 +20,7 @@
 
 kde4_add_executable(akonadi_localbookmarks_resource RUN_UNINSTALLED ${localbookmarksresource_SRCS})
 
-target_link_libraries(akonadi_localbookmarks_resource akonadi ${QT_QTDBUS_LIBRARIES}  ${KDE4_KCAL_LIBS} ${KDE4_KIO_LIBRARY})
+target_link_libraries(akonadi_localbookmarks_resource akonadi ${QT_QTDBUS_LIBRARY}  ${KDE4_KCAL_LIBS} ${KDE4_KIO_LIBRARY})
 
 install(TARGETS akonadi_localbookmarks_resource DESTINATION ${BIN_INSTALL_DIR})
 
Index: akonadi/resources/openchange/CMakeLists.txt
===================================================================
--- akonadi/resources/openchange/CMakeLists.txt	(wersja 763037)
+++ akonadi/resources/openchange/CMakeLists.txt	(kopia robocza)
@@ -23,7 +23,7 @@
 
 kde4_add_executable(akonadi_oc_resource RUN_UNINSTALLED ${ocresource_SRCS})
 
-target_link_libraries(akonadi_oc_resource akonadi ${QT_QTDBUS_LIBRARIES} ${LIBMAPI_LIBRARIES} ${KDE4_KIO_LIBRARY} kmimeakonadi)
+target_link_libraries(akonadi_oc_resource akonadi ${QT_QTDBUS_LIBRARY} ${LIBMAPI_LIBRARIES} ${KDE4_KIO_LIBRARY} kmimeakonadi)
 
 install(TARGETS akonadi_oc_resource DESTINATION ${BIN_INSTALL_DIR})
 
Index: akonadi/resources/ical/CMakeLists.txt
===================================================================
--- akonadi/resources/ical/CMakeLists.txt	(wersja 763037)
+++ akonadi/resources/ical/CMakeLists.txt	(kopia robocza)
@@ -20,7 +20,7 @@
 
 kde4_add_executable(akonadi_ical_resource RUN_UNINSTALLED ${icalresource_SRCS})
 
-target_link_libraries(akonadi_ical_resource akonadi ${QT_QTDBUS_LIBRARIES}  ${KDE4_KCAL_LIBS} ${KDE4_KIO_LIBRARY})
+target_link_libraries(akonadi_ical_resource akonadi ${QT_QTDBUS_LIBRARY}  ${KDE4_KCAL_LIBS} ${KDE4_KIO_LIBRARY})
 
 install(TARGETS akonadi_ical_resource DESTINATION ${BIN_INSTALL_DIR})
 
