CMakeLists.txt 3 KB
Newer Older
Laurent Montel's avatar
Laurent Montel committed
1
configure_file(kontact-version.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/kontact-version.h @ONLY)
2
add_subdirectory(about)
3

4
include_directories(
Laurent Montel's avatar
indent  
Laurent Montel committed
5 6
    ${CMAKE_CURRENT_BINARY_DIR}
    )
7 8 9

########### next target ###############

Laurent Montel's avatar
Laurent Montel committed
10
set(kontactprivate_LIB_SRCS
Laurent Montel's avatar
Laurent Montel committed
11 12
    webengine/introductionwebenginepage.cpp
    webengine/introductionwebengineview.cpp
Laurent Montel's avatar
indent  
Laurent Montel committed
13 14 15 16 17 18
    mainwindow.cpp
    sidepanebase.cpp
    iconsidepane.cpp
    aboutdialog.cpp
    kontactconfiguredialog.cpp
    )
Laurent Montel's avatar
Laurent Montel committed
19 20 21 22 23 24 25 26 27 28

if (ECM_VERSION VERSION_LESS "5.68.0")
    ecm_qt_declare_logging_category(kontactprivate_LIB_SRCS HEADER kontact_debug.h IDENTIFIER KONTACT_LOG CATEGORY_NAME org.kde.pim.kontact)
else()
    ecm_qt_declare_logging_category(kontactprivate_LIB_SRCS HEADER kontact_debug.h IDENTIFIER KONTACT_LOG CATEGORY_NAME org.kde.pim.kontact
        DESCRIPTION "kontact (kontact application)"
        OLD_CATEGORY_NAMES log_kontact
        EXPORT KONTACT
    )
endif()
29

30
kconfig_add_kcfg_files(kontactprivate_LIB_SRCS prefs.kcfgc)
Laurent Montel's avatar
Laurent Montel committed
31
qt5_add_resources(kontactprivate_LIB_SRCS kontact.qrc)
32

33
add_library(kontactprivate ${kontactprivate_LIB_SRCS})
34
generate_export_header(kontactprivate BASE_NAME kontact)
35

Allen Winter's avatar
Allen Winter committed
36
target_link_libraries(kontactprivate
Laurent Montel's avatar
indent  
Laurent Montel committed
37 38 39 40 41 42 43 44 45
    PUBLIC
    KF5::WindowSystem
    KF5::IconThemes
    PRIVATE
    KF5::KIOWidgets
    KF5::KontactInterface
    KF5::KCMUtils
    KF5::Libkdepim
    KF5::GrantleeTheme
Laurent Montel's avatar
Laurent Montel committed
46 47
    Qt5::WebEngine
    Qt5::WebEngineWidgets
Laurent Montel's avatar
indent  
Laurent Montel committed
48
    )
49

Allen Winter's avatar
Allen Winter committed
50
set_target_properties(kontactprivate PROPERTIES
Laurent Montel's avatar
indent  
Laurent Montel committed
51 52 53
    VERSION ${KDEPIM_LIB_VERSION}
    SOVERSION ${KDEPIM_LIB_SOVERSION}
    )
54

55
install(TARGETS kontactprivate ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} LIBRARY NAMELINK_SKIP)
56 57 58

########### next target ###############

59
set(kontact_bin_SRCS main.cpp kontact_debug.cpp)
60

61 62
file(GLOB icons "${CMAKE_CURRENT_SOURCE_DIR}/icons/*-apps-kontact.png")
ecm_add_app_icon(kontact_bin_SRCS ICONS ${icons})
63

64
add_executable(kontact_bin ${kontact_bin_SRCS})
65

66
set_target_properties(kontact_bin PROPERTIES OUTPUT_NAME kontact)
67

68
target_link_libraries(kontact_bin
Laurent Montel's avatar
indent  
Laurent Montel committed
69 70 71 72
    KF5::Service
    KF5::KdepimDBusInterfaces
    kontactprivate
    KF5::KontactInterface
Laurent Montel's avatar
Laurent Montel committed
73
    KF5::Crash
Laurent Montel's avatar
indent  
Laurent Montel committed
74
    )
Volker Krause's avatar
Volker Krause committed
75

76
install(TARGETS kontact_bin ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
77 78 79

########### next target ###############

80
set(kcm_kontact_PART_SRCS kcmkontact.cpp)
81

82
add_library(kcm_kontact MODULE ${kcm_kontact_PART_SRCS})
83

Allen Winter's avatar
Allen Winter committed
84
target_link_libraries(kcm_kontact
Laurent Montel's avatar
indent  
Laurent Montel committed
85 86 87 88 89 90
    KF5::KCMUtils
    KF5::Libkdepim
    kontactprivate
    KF5::KIOWidgets
    KF5::KontactInterface
    )
Laurent Montel's avatar
Laurent Montel committed
91

92
install(TARGETS kcm_kontact DESTINATION ${KDE_INSTALL_PLUGINDIR})
93 94 95

########### install files ###############

96 97 98
install(PROGRAMS data/org.kde.kontact.desktop DESTINATION ${KDE_INSTALL_APPDIR})
install(FILES data/org.kde.kontact.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR})
install(FILES data/kontactconfig.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR})
99
install(FILES kontact.kcfg DESTINATION ${KDE_INSTALL_KCFGDIR})
100 101
configure_file(data/org.kde.kontact.service.in org.kde.kontact.service)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/org.kde.kontact.service DESTINATION ${KDE_INSTALL_DBUSSERVICEDIR})
102

103
add_subdirectory(icons)
104