CMakeLists.txt 2.01 KB
Newer Older
1

Laurent Montel's avatar
Laurent Montel committed
2
add_definitions(-DTRANSLATION_DOMAIN=\"akonadi_icaldir_resource\")
3
4


Laurent Montel's avatar
Laurent Montel committed
5
6
7
8
9
set(contactsresource_common_SRCS)

kconfig_add_kcfg_files(icaldirresource_common_SRCS
    settings.kcfgc
  )
10
11
12
13
########### next target ###############

set( icaldirresource_SRCS
  icaldirresource.cpp
Laurent Montel's avatar
Laurent Montel committed
14
  ${icaldirresource_common_SRCS}
15
16
17
)

kcfg_generate_dbus_interface(${CMAKE_CURRENT_SOURCE_DIR}/icaldirresource.kcfg org.kde.Akonadi.ICalDirectory.Settings)
Laurent Montel's avatar
Laurent Montel committed
18
qt5_add_dbus_adaptor(icaldirresource_SRCS
Laurent Montel's avatar
Laurent Montel committed
19
  ${CMAKE_CURRENT_BINARY_DIR}/org.kde.Akonadi.ICalDirectory.Settings.xml settings.h IcalDirResourceSettings
20
21
)

Laurent Montel's avatar
Laurent Montel committed
22
install( FILES icaldirresource.desktop DESTINATION "${KDE_INSTALL_DATAROOTDIR}/akonadi/agents" )
23

Laurent Montel's avatar
Laurent Montel committed
24
add_executable(akonadi_icaldir_resource ${icaldirresource_SRCS})
25

Laurent Montel's avatar
Laurent Montel committed
26
if( APPLE )
27
28
29
  set_target_properties(akonadi_icaldir_resource PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/../Info.plist.template)
  set_target_properties(akonadi_icaldir_resource PROPERTIES MACOSX_BUNDLE_GUI_IDENTIFIER "org.kde.Akonadi.ICalDirectory")
  set_target_properties(akonadi_icaldir_resource PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "KDE Akonadi ICalDirectory Resource")
30
endif ()
31
32
33


target_link_libraries(akonadi_icaldir_resource
Laurent Montel's avatar
Laurent Montel committed
34
  KF5::AkonadiCore
Daniel Vrátil's avatar
Daniel Vrátil committed
35
  KF5::AkonadiAgentBase
Laurent Montel's avatar
Laurent Montel committed
36
  KF5::CalendarCore
Daniel Vrátil's avatar
Daniel Vrátil committed
37
38
39
40
  KF5::I18n
  KF5::TextWidgets
  KF5::KIOWidgets
  KF5::ConfigWidgets
41
42
)

43
install(TARGETS akonadi_icaldir_resource ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
Laurent Montel's avatar
Laurent Montel committed
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70

############################## Config plugin ################################
set(icaldirconfig_ui_SRCS)
ki18n_wrap_ui(icaldirconfig_ui_SRCS icaldirsagentsettingswidget.ui)

set(icaldirconfig_SRCS
    icaldirsettingswidget.cpp
    ${icaldirconfig_ui_SRCS}
    ${icaldirresource_common_SRCS}
    )


kcoreaddons_add_plugin(icaldirconfig
    SOURCES ${icaldirconfig_SRCS}
    JSON "icaldirconfig.json"
    INSTALL_NAMESPACE "akonadi/config"
    )
target_link_libraries(icaldirconfig
    KF5::AkonadiCore
    KF5::CalendarCore
    KF5::AkonadiAgentBase
    KF5::Contacts
    KF5::AkonadiWidgets
    KF5::I18n
    KF5::KIOWidgets
    KF5::TextWidgets
    )