CMakeLists.txt 2.55 KB
Newer Older
1

Laurent Montel's avatar
Laurent Montel committed
2 3 4 5 6 7 8 9 10 11 12
if (TARGET KUserFeedbackWidgets)
    add_definitions(-DWITH_KUSERFEEDBACK)
endif()

set(pimdataexporter_userfeedback_SRCS)
if (TARGET KUserFeedbackWidgets)
    set(pimdataexporter_userfeedback_SRCS ${pimdataexporter_userfeedback_SRCS}
        userfeedback/userfeedbackmanager.cpp
        )
endif()

13
include_directories( 
Laurent Montel's avatar
Laurent Montel committed
14
    ${pim-data-exporter_SOURCE_DIR}/core/
Laurent Montel's avatar
indent  
Laurent Montel committed
15
    )
16 17


18
set( pimdataexporter_kcfg_SRCS settings/pimdataexporterglobalconfig.kcfgc )
Laurent Montel's avatar
Laurent Montel committed
19

20
kconfig_add_kcfg_files(pimdataexporter_kcfg_SRCS ${pimdataexporter_kcfg_SRCS})
Laurent Montel's avatar
Laurent Montel committed
21 22


23
set(pimdataexporter_widget_SRCS
Laurent Montel's avatar
indent  
Laurent Montel committed
24 25
    widgets/selectiontypetreewidget.cpp
    widgets/logwidget.cpp
Laurent Montel's avatar
Laurent Montel committed
26
    widgets/pimdataexporterconfigurewidget.cpp
Laurent Montel's avatar
indent  
Laurent Montel committed
27
    )
28

29
set(pimdataexporter_dialog_SRCS
Laurent Montel's avatar
indent  
Laurent Montel committed
30 31 32 33
    dialog/selectiontypedialog.cpp
    dialog/backupfilestructureinfodialog.cpp
    dialog/showarchivestructuredialog.cpp
    dialog/synchronizeresourcedialog.cpp
Laurent Montel's avatar
Laurent Montel committed
34
    dialog/pimdataexporterconfiguredialog.cpp
Laurent Montel's avatar
indent  
Laurent Montel committed
35
    )
36

37
set(pimdataexporter_job_SRCS
Laurent Montel's avatar
indent  
Laurent Montel committed
38 39
    job/fullsynchronizeresourcesjob.cpp
    )
40

41
set(pimdataexporter_trayicon_SRCS
Laurent Montel's avatar
Laurent Montel committed
42
    trayicon/pimdatatrayicon.cpp
Laurent Montel's avatar
indent  
Laurent Montel committed
43
    )
Laurent Montel's avatar
Laurent Montel committed
44

45
set(pimdataexporter_SRCS
Laurent Montel's avatar
Laurent Montel committed
46
    ${pimdataexporter_kcfg_SRCS}
47
    ${pimdataexporter_widget_SRCS}
Laurent Montel's avatar
Laurent Montel committed
48
    ${pimdataexporter_userfeedback_SRCS}
49 50 51
    ${pimdataexporter_dialog_SRCS}
    ${pimdataexporter_job_SRCS}
    ${pimdataexporter_trayicon_SRCS}
Laurent Montel's avatar
Laurent Montel committed
52
    pimdatabackuprestoreui.cpp
53
    importexportprogressindicatorgui.cpp
Laurent Montel's avatar
Laurent Montel committed
54 55
    pimdataexporterwindow.cpp
    pimdatacommandlineoption.cpp
56
    main.cpp)
57

Laurent Montel's avatar
Laurent Montel committed
58
qt5_add_resources(pimdataexporter_SRCS pimdataexporter.qrc)
59

Laurent Montel's avatar
Laurent Montel committed
60
ecm_qt_declare_logging_category(pimdataexporter_SRCS HEADER pimdataexportgui_debug.h IDENTIFIER PIMDATAEXPORTERGUI_LOG CATEGORY_NAME org.kde.pim.pimdataexportergui)
Laurent Montel's avatar
Laurent Montel committed
61

Laurent Montel's avatar
Laurent Montel committed
62
add_executable(pimdataexporter ${pimdataexporter_SRCS})
63

Laurent Montel's avatar
Laurent Montel committed
64 65 66 67 68
set(pimdataexporter_userfeedback_LIB)
if (TARGET KUserFeedbackWidgets)
	set(pimdataexporter_userfeedback_LIB KUserFeedbackWidgets)
endif()

Laurent Montel's avatar
Laurent Montel committed
69
target_link_libraries(pimdataexporter
Laurent Montel's avatar
indent  
Laurent Montel committed
70 71 72 73 74 75
    PRIVATE
    KF5::XmlGui
    KF5::DBusAddons
    KF5::MailCommon
    KF5::PimCommon
    KF5::Libkdepim
Laurent Montel's avatar
Laurent Montel committed
76
    pimdataexporterprivate
Laurent Montel's avatar
indent  
Laurent Montel committed
77 78 79 80 81
    KF5::Archive
    KF5::ItemViews
    KF5::KIOFileWidgets
    KF5::Notifications
    KF5::I18n
Laurent Montel's avatar
Laurent Montel committed
82
    KF5::Crash
Laurent Montel's avatar
Laurent Montel committed
83
    ${pimdataexporter_userfeedback_LIB}
Laurent Montel's avatar
Laurent Montel committed
84
    KF5::WidgetsAddons
Laurent Montel's avatar
indent  
Laurent Montel committed
85
    )
86

Laurent Montel's avatar
Laurent Montel committed
87 88
add_subdirectory(kconf_update)

Laurent Montel's avatar
Laurent Montel committed
89
install(TARGETS pimdataexporter ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} )
90

Laurent Montel's avatar
Laurent Montel committed
91
install(PROGRAMS org.kde.pimdataexporter.desktop DESTINATION ${KDE_INSTALL_APPDIR})
92

Laurent Montel's avatar
Laurent Montel committed
93
install(FILES settings/pimdataexporterglobalconfig.kcfg DESTINATION ${KDE_INSTALL_KCFGDIR})
Laurent Montel's avatar
Laurent Montel committed
94

Laurent Montel's avatar
Laurent Montel committed
95 96
if(BUILD_TESTING)
    add_subdirectory(tests)
Laurent Montel's avatar
Laurent Montel committed
97
    add_subdirectory(autotests)
Laurent Montel's avatar
Laurent Montel committed
98
endif()
99