1 remove_definitions(-DKDE_DEFAULT_DEBUG_AREA=5850) #remove korganizer debug area
2 add_definitions(-DKDE_DEFAULT_DEBUG_AREA=5890)
4 option(KORGAC_AKONADI_AGENT FALSE "Build Korgac as Akonadi agent instead of a stand-alone process")
5 if (KORGAC_AKONADI_AGENT)
6 add_definitions( -DKORGAC_AKONADI_AGENT )
9 add_subdirectory(pixmaps)
10 add_subdirectory(tests)
12 ${CMAKE_SOURCE_DIR}/korganizer
13 ${CMAKE_BINARY_DIR}/korganizer )
16 ########### next target ###############
21 if(KORGAC_AKONADI_AGENT)
22 set(korgac_SRCS ${korgac_SRCS} korgacagent.cpp)
24 set(korgac_SRCS ${korgac_SRCS} korgacmain.cpp)
35 set(korganizer_xml ${CMAKE_SOURCE_DIR}/korganizer/org.kde.korganizer.Korganizer.xml)
36 QT4_ADD_DBUS_INTERFACE(korgac_SRCS ${korganizer_xml} korganizer_interface)
40 qt4_add_dbus_adaptor(korgac_SRCS org.kde.korganizer.KOrgac.xml koalarmclient.h KOAlarmClient)
42 if (RUNTIME_PLUGINS_STATIC)
43 add_definitions(-DSERIALIZER_PLUGIN_STATIC)
44 endif (RUNTIME_PLUGINS_STATIC)
46 kde4_add_app_icon(korgac_SRCS "${KDE4_ICON_DIR}/oxygen/*/apps/korgac.png")
48 if(KORGAC_AKONADI_AGENT)
50 kde4_add_plugin(korgac ${korgac_SRCS})
52 kde4_add_plugin(korgac STATIC ${korgac_SRCS})
55 kde4_add_executable(korgac ${korgac_SRCS})
58 target_link_libraries(korgac
62 ${KDEPIMLIBS_KPIMIDENTITIES_LIBS}
63 ${KDEPIMLIBS_AKONADI_LIBS}
64 ${KDEPIMLIBS_MAILTRANSPORT_LIBS}
65 ${KDEPIMLIBS_KCALCORE_LIBS}
66 ${KDEPIMLIBS_KCALUTILS_LIBS}
71 if (RUNTIME_PLUGINS_STATIC)
72 target_link_libraries(korgac akonadi_serializer_kcalcore )
73 endif (RUNTIME_PLUGINS_STATIC)
76 target_link_libraries(korgac korganizer_core)
79 # TODO: move this to FindQt4.cmake
80 find_library( QT_QMAEMO5_LIBRARY QtMaemo5 HINTS ${QT_LIBRARY_DIR} )
81 if ( QT_QMAEMO5_LIBRARY )
82 target_link_libraries( korgac ${QT_QMAEMO5_LIBRARY} )
85 if(KORGAC_AKONADI_AGENT)
86 install(TARGETS korgac DESTINATION ${PLUGIN_INSTALL_DIR})
87 install(FILES korgacagent.desktop DESTINATION ${CMAKE_INSTALL_PREFIX}/share/akonadi/agents)
89 install(TARGETS korgac ${INSTALL_TARGETS_DEFAULT_ARGS})
93 ########### install files ###############
95 install(PROGRAMS korgac.desktop DESTINATION ${AUTOSTART_INSTALL_DIR})
96 install(FILES org.kde.korganizer.KOrgac.xml DESTINATION ${DBUS_INTERFACES_INSTALL_DIR})