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

Laurent Montel's avatar
Laurent Montel committed
3
4
5
6
7
8
if(WIN32)
    set(LIB_INSTALL_DIR ${KDE_INSTALL_LIBDIR}
        RUNTIME DESTINATION ${KDE_INSTALL_BINDIR}
        LIBRARY DESTINATION ${KDE_INSTALL_LIBDIR}
        ARCHIVE DESTINATION ${KDE_INSTALL_LIBDIR} )
endif()
Christophe Giboudeaux's avatar
Christophe Giboudeaux committed
9

Laurent Montel's avatar
Laurent Montel committed
10
########### next target ###############
Laurent Montel's avatar
Laurent Montel committed
11
12
set(davgroupwareresource_common_SRCS)
kconfig_add_kcfg_files(davgroupwareresource_common_SRCS settingsbase.kcfgc)
Christophe Giboudeaux's avatar
Christophe Giboudeaux committed
13

Laurent Montel's avatar
Laurent Montel committed
14
15
16
17
18
19
20
set(davgroupwareconfig_SRCS
    configdialog.cpp
    searchdialog.cpp
    setupwizard.cpp

    )
ki18n_wrap_ui(davgroupwareconfig_SRCS configdialog.ui urlconfigurationdialog.ui searchdialog.ui)
Christophe Giboudeaux's avatar
Christophe Giboudeaux committed
21

Laurent Montel's avatar
Laurent Montel committed
22
23
24
25

set( davgroupwareresource_SRCS
    ${davgroupwareresource_common_SRCS}
    ${davgroupwareconfig_SRCS}
Sandro Knauß's avatar
Sandro Knauß committed
26
27
28
29
    daverror-kdepim-runtime.cpp
    akonadietagcache.cpp
    utils.cpp

30
    ctagattribute.cpp
Christophe Giboudeaux's avatar
Christophe Giboudeaux committed
31
32
33
34
    davfreebusyhandler.cpp
    davprotocolattribute.cpp
    settings.cpp
    urlconfigurationdialog.cpp
Sandro Knauß's avatar
Sandro Knauß committed
35
    davgroupwareresource.cpp
Laurent Montel's avatar
Laurent Montel committed
36
    )
Christophe Giboudeaux's avatar
Christophe Giboudeaux committed
37

38
39
40
41
ecm_qt_declare_logging_category(davgroupwareresource_SRCS HEADER davresource_debug.h IDENTIFIER DAVRESOURCE_LOG CATEGORY_NAME org.kde.pim.davresource
    DESCRIPTION "dav resource (kdepim-runtime)"
    OLD_CATEGORY_NAMES log_davresource
    EXPORT KDEPIMRUNTIME
Laurent Montel's avatar
Laurent Montel committed
42
43
    )

Laurent Montel's avatar
Laurent Montel committed
44

Laurent Montel's avatar
Laurent Montel committed
45
46
install( FILES davgroupwareresource.desktop DESTINATION "${KDE_INSTALL_DATAROOTDIR}/akonadi/agents" )
install( FILES davgroupwareprovider.desktop DESTINATION ${KDE_INSTALL_KSERVICETYPES5DIR} )
Christophe Giboudeaux's avatar
Christophe Giboudeaux committed
47

Laurent Montel's avatar
Laurent Montel committed
48
49
file( GLOB providersFiles "../services/*.desktop" )
install( FILES ${providersFiles} DESTINATION "${KDE_INSTALL_KSERVICES5DIR}/akonadi/davgroupware-providers" )
Christophe Giboudeaux's avatar
Christophe Giboudeaux committed
50

Laurent Montel's avatar
Laurent Montel committed
51
52
kcfg_generate_dbus_interface(${CMAKE_CURRENT_SOURCE_DIR}/davgroupwareresource.kcfg org.kde.Akonadi.davGroupware.Settings)
qt5_add_dbus_adaptor(davgroupwareresource_SRCS
Christophe Giboudeaux's avatar
Christophe Giboudeaux committed
53
    ${CMAKE_CURRENT_BINARY_DIR}/org.kde.Akonadi.davGroupware.Settings.xml settings.h Settings
Laurent Montel's avatar
Laurent Montel committed
54
    )
Christophe Giboudeaux's avatar
Christophe Giboudeaux committed
55

Laurent Montel's avatar
Laurent Montel committed
56
add_executable(akonadi_davgroupware_resource ${davgroupwareresource_SRCS})
57
58
59
if (COMPILE_WITH_UNITY_CMAKE_SUPPORT)
    set_target_properties(akonadi_davgroupware_resource PROPERTIES UNITY_BUILD ON)
endif()
Christophe Giboudeaux's avatar
Christophe Giboudeaux committed
60

Laurent Montel's avatar
Laurent Montel committed
61
if( APPLE )
Christophe Giboudeaux's avatar
Christophe Giboudeaux committed
62
63
64
    set_target_properties(akonadi_davgroupware_resource PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/../../Info.plist.template)
    set_target_properties(akonadi_davgroupware_resource PROPERTIES MACOSX_BUNDLE_GUI_IDENTIFIER "org.kde.Akonadi.davGroupware")
    set_target_properties(akonadi_davgroupware_resource PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "KDE Akonadi davGroupware Resource")
Laurent Montel's avatar
Laurent Montel committed
65
endif ()
Christophe Giboudeaux's avatar
Christophe Giboudeaux committed
66

Laurent Montel's avatar
Laurent Montel committed
67
68
69
70
71
72
73
74
75
76
77
78
target_link_libraries(akonadi_davgroupware_resource
    KF5::Contacts
    KF5::AkonadiCalendar
    KF5::KIOCore
    KF5::AkonadiAgentBase
    KF5::AkonadiCore
    KF5::Wallet
    KF5::CalendarCore
    KF5::Completion
    KF5::ConfigCore
    KF5::ConfigWidgets
    KF5::WindowSystem
Volker Krause's avatar
Volker Krause committed
79
    KF5::DAV
80
    Qt5::Xml
Laurent Montel's avatar
Laurent Montel committed
81
    )
Christophe Giboudeaux's avatar
Christophe Giboudeaux committed
82

Laurent Montel's avatar
Laurent Montel committed
83
install(TARGETS akonadi_davgroupware_resource ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
84