Backport fix google translator
[kdepim.git] / agents / sendlateragent / CMakeLists.txt
blob01ce0da2c0a7649e12b4b2522e282c09476603cf
1 project(sendlateragent)
3 add_definitions(-DTRANSLATION_DOMAIN=\"akonadi_sendlater_agent\")
5 if(BUILD_TESTING)
6     add_subdirectory(tests)
7     add_subdirectory(autotests)
8 endif()
10 set(sendlater_common_SRCS)
11 ecm_qt_declare_logging_category(sendlater_common_SRCS HEADER sendlateragent_debug.h IDENTIFIER SENDLATERAGENT_LOG CATEGORY_NAME log_sendlateragent)
13 set(sendlateragent_SRCS
14    ${sendlater_common_SRCS}
15    sendlateragent.cpp
16    sendlaterconfiguredialog.cpp
17    sendlaterconfigurewidget.cpp
18    sendlatermanager.cpp
19    sendlaterjob.cpp
20    sendlaterremovemessagejob.cpp
23 qt5_add_dbus_adaptor(sendlateragent_SRCS org.freedesktop.Akonadi.SendLaterAgent.xml sendlateragent.h SendLaterAgent)
25 ki18n_wrap_ui(sendlateragent_SRCS ui/sendlaterconfigurewidget.ui)
27 add_executable(akonadi_sendlater_agent ${sendlateragent_SRCS})
29 target_link_libraries(akonadi_sendlater_agent
30   KF5::SendLater
31   KF5::AkonadiCore
32   KF5::AkonadiMime
33   KF5::MailTransport
34   KF5::Mime
35   KF5::MessageComposer
36   KF5::MessageCore
37   KF5::PimCommon
38   KF5::AkonadiAgentBase
39   KF5::DBusAddons
40   KF5::WindowSystem
41   KF5::XmlGui
42   KF5::Notifications
43   KF5::IconThemes
46 if( APPLE )
47   set_target_properties(akonadi_sendlater_agent PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_SOURCE_DIR}/Info.plist.template)
48   set_target_properties(akonadi_sendlater_agent PROPERTIES MACOSX_BUNDLE_GUI_IDENTIFIER "org.kde.Akonadi.KF5::SendLater")
49   set_target_properties(akonadi_sendlater_agent PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "KDE Akonadi Send Later")
50 endif ()
52 install(TARGETS akonadi_sendlater_agent ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} )
54 install(FILES sendlateragent.desktop DESTINATION "${KDE_INSTALL_DATAROOTDIR}/akonadi/agents")
55 install(FILES akonadi_sendlater_agent.notifyrc DESTINATION ${KDE_INSTALL_KNOTIFY5RCDIR} )