CMakeLists.txt 2.65 KB
Newer Older
Laurent Montel's avatar
Laurent Montel committed
1
add_definitions(-DTRANSLATION_DOMAIN=\"akonadi_pop3_resource\")
2

Thomas McGuire's avatar
Thomas McGuire committed
3

4 5
set(pop3_common_SRCS
    settings.cpp
6
    )
7
kconfig_add_kcfg_files(pop3_common_SRCS settingsbase.kcfgc)
8 9 10 11
ecm_qt_declare_logging_category(pop3_common_SRCS HEADER pop3resource_debug.h IDENTIFIER POP3RESOURCE_LOG CATEGORY_NAME org.kde.pim.pop3resource
    DESCRIPTION "pop3 resource (kdepim-runtime)"
    OLD_CATEGORY_NAMES log_pop3resource
    EXPORT KDEPIMRUNTIME
12 13
    )

14 15
kcfg_generate_dbus_interface(${CMAKE_CURRENT_SOURCE_DIR}/settings.kcfg org.kde.Akonadi.POP3.Settings)
qt5_add_dbus_adaptor(pop3_common_SRCS
16 17
    ${CMAKE_CURRENT_BINARY_DIR}/org.kde.Akonadi.POP3.Settings.xml settings.h Settings
    )
Thomas McGuire's avatar
Thomas McGuire committed
18

19
################################# Resource ####################################
Thomas McGuire's avatar
Thomas McGuire committed
20 21

set( pop3resource_SRCS
22 23 24 25
    pop3resource.cpp
    jobs.cpp
    ${pop3_common_SRCS}
    )
Thomas McGuire's avatar
Thomas McGuire committed
26

Laurent Montel's avatar
Laurent Montel committed
27
install( FILES pop3resource.desktop DESTINATION "${KDE_INSTALL_DATAROOTDIR}/akonadi/agents" )
Thomas McGuire's avatar
Thomas McGuire committed
28

Laurent Montel's avatar
Laurent Montel committed
29 30
#add_executable(akonadi_pop3_resource RUN_UNINSTALLED ${pop3resource_SRCS})
add_executable(akonadi_pop3_resource ${pop3resource_SRCS})
Thomas McGuire's avatar
Thomas McGuire committed
31

Laurent Montel's avatar
Laurent Montel committed
32
if( APPLE )
33 34 35
    set_target_properties(akonadi_pop3_resource PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/../Info.plist.template)
    set_target_properties(akonadi_pop3_resource PROPERTIES MACOSX_BUNDLE_GUI_IDENTIFIER "org.kde.Akonadi.POP3")
    set_target_properties(akonadi_pop3_resource PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "KDE Akonadi POP3 Resource")
36
endif ()
37 38


Thomas McGuire's avatar
Thomas McGuire committed
39
target_link_libraries( akonadi_pop3_resource
40 41 42 43 44 45 46 47 48 49
    KF5::AkonadiCore
    KF5::AkonadiMime
    KF5::KIOCore
    KF5::Mime
    KF5::MailTransport
    KF5::AkonadiAgentBase
    KF5::I18n
    KF5::Notifications
    Qt5::DBus
    KF5::PimCommon
50
    qt5keychain
51
    )
52 53 54
if (COMPILE_WITH_UNITY_CMAKE_SUPPORT)
    set_target_properties(akonadi_pop3_resource PROPERTIES UNITY_BUILD ON)
endif()
Thomas McGuire's avatar
Thomas McGuire committed
55

56 57 58 59
if(BUILD_TESTING)
    add_subdirectory( autotests )
endif()

Laurent Montel's avatar
Laurent Montel committed
60
add_subdirectory( wizard )
61

62
install(TARGETS akonadi_pop3_resource ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
63
install(FILES akonadi_pop3_resource.notifyrc DESTINATION ${KDE_INSTALL_KNOTIFY5RCDIR})
64 65 66 67 68 69 70 71


################################## Config plugin ##############################

set(pop3config_SRCS
    pop3config.cpp
    accountwidget.cpp
    ${pop3_common_SRCS}
72
    )
73 74 75 76 77 78
ki18n_wrap_ui(pop3config_SRCS popsettings.ui)

kcoreaddons_add_plugin(pop3config
    SOURCES ${pop3config_SRCS}
    JSON "pop3config.json"
    INSTALL_NAMESPACE "akonadi/config"
79
    )
80 81 82 83 84 85 86 87 88 89
target_link_libraries(pop3config
    KF5::AkonadiCore
    KF5::TextWidgets
    KF5::Completion
    KF5::WidgetsAddons
    KF5::I18n
    KF5::MailTransport
    KF5::AkonadiWidgets
    KF5::AkonadiAgentBase
    KF5::AkonadiMime
90
    KF5::Libkdepim
91
    qt5keychain
92
    )