CMakeLists.txt 2.27 KB
Newer Older
1 2 3 4 5
set(etesyncresource_common_SRCS)
kconfig_add_kcfg_files(etesyncresource_common_SRCS
    ${CMAKE_CURRENT_SOURCE_DIR}/settings.kcfgc
)

6 7
set(etesyncresource_SRCS
    etesyncresource.cpp
8
    ${etesyncresource_common_SRCS}
9 10 11
)

ecm_qt_declare_logging_category(etesyncresource_SRCS
12
    HEADER etesync_debug.h
13
    IDENTIFIER ETESYNC_LOG
14
    CATEGORY_NAME org.kde.pim.etesync
15
    DESCRIPTION "resource etesync (kdepim-runtime)"
16
    EXPORT KDEPIMRUNTIME
17 18 19
)

kcfg_generate_dbus_interface(
20
    ${CMAKE_CURRENT_SOURCE_DIR}/etesyncresource.kcfg
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
    org.kde.Akonadi.etesync.Settings
)

qt5_add_dbus_adaptor(etesyncresource_SRCS
    ${CMAKE_CURRENT_BINARY_DIR}/org.kde.Akonadi.etesync.Settings.xml
    ${CMAKE_CURRENT_BINARY_DIR}/settings.h
    Settings
)

add_executable(akonadi_etesync_resource ${etesyncresource_SRCS})
set_target_properties(akonadi_etesync_resource PROPERTIES MACOSX_BUNDLE FALSE)

target_link_libraries(akonadi_etesync_resource
    ${ETESYNC_LIBRARIES}
    Qt5::DBus
    KF5::AkonadiAgentBase
    KF5::ConfigCore
38
    KF5::Contacts
39
    KF5::I18n
40 41
)

Shashwat Jolly's avatar
Shashwat Jolly committed
42 43 44 45 46 47 48 49 50 51 52 53 54
ecm_install_icons(
    ICONS
    icons/16-apps-akonadi-etesync.png
    icons/24-apps-akonadi-etesync.png
    icons/32-apps-akonadi-etesync.png
    icons/48-apps-akonadi-etesync.png
    icons/64-apps-akonadi-etesync.png
    icons/72-apps-akonadi-etesync.png
    icons/128-apps-akonadi-etesync.png
    DESTINATION ${KDE_INSTALL_ICONDIR}
    THEME hicolor
    )

55 56 57 58 59
install(TARGETS akonadi_etesync_resource ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})

install(FILES etesyncresource.desktop
    DESTINATION ${KDE_INSTALL_DATAROOTDIR}/akonadi/agents
)
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75

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

set(etesyncconfig_SRCS
  etesyncconfig.cpp
  ${etesyncresource_common_SRCS}
)

ecm_qt_declare_logging_category(etesyncconfig_SRCS
    HEADER etesyncconfig_debug.h
    IDENTIFIER ETESYNC_CONFIG_LOG
    CATEGORY_NAME org.kde.pim.etesync.config
    DESCRIPTION "resource etesync (kdepim-runtime)"
    EXPORT KDEPIMRUNTIME
)

Shashwat Jolly's avatar
Shashwat Jolly committed
76
ki18n_wrap_ui(etesyncconfig_SRCS etesyncconfigwidget.ui)
77 78 79 80 81 82 83 84 85 86 87 88 89 90

kcoreaddons_add_plugin(etesyncconfig
    SOURCES ${etesyncconfig_SRCS}
    JSON "etesyncconfig.json"
    INSTALL_NAMESPACE "akonadi/config"
)

target_link_libraries(etesyncconfig
    KF5::AkonadiCore
    KF5::I18n
    KF5::Completion
    KF5::ConfigWidgets
    KF5::KIOCore
)