CMakeLists.txt 2.07 KB
Newer Older
1
project(korgac)
2

3
add_definitions(-DTRANSLATION_DOMAIN=\"korgac\")
4 5 6
add_definitions( -DQT_NO_CAST_FROM_ASCII )
add_definitions( -DQT_NO_CAST_TO_ASCII )

Laurent Montel's avatar
Laurent Montel committed
7

8
add_subdirectory(pixmaps)
9 10 11 12

if(BUILD_TESTING)
    add_subdirectory(tests)
endif()
13

14 15
########### next target ###############

Allen Winter's avatar
Allen Winter committed
16
set(korgac_SRCS
Laurent Montel's avatar
indent  
Laurent Montel committed
17 18
    koalarmclient.cpp
    )
Andreas Holzammer's avatar
Andreas Holzammer committed
19

Laurent Montel's avatar
Laurent Montel committed
20 21
ecm_qt_declare_logging_category(korgac_SRCS HEADER koalarmclient_debug.h IDENTIFIER KOALARMCLIENT_LOG CATEGORY_NAME log_koalarmclient)

22
set(korgac_SRCS ${korgac_SRCS} korgacmain.cpp)
23

24
set(korgac_SRCS
Laurent Montel's avatar
indent  
Laurent Montel committed
25 26 27 28 29
    ${korgac_SRCS}
    alarmdialog.cpp
    alarmdockwindow.cpp
    mailclient.cpp
    )
30

Laurent Montel's avatar
Laurent Montel committed
31
set(korganizer_xml ../src/data/org.kde.korganizer.Korganizer.xml)
32

Laurent Montel's avatar
Laurent Montel committed
33
qt5_add_dbus_interface(korgac_SRCS ${korganizer_xml}
Laurent Montel's avatar
indent  
Laurent Montel committed
34 35
    korganizer_interface
    )
36

Laurent Montel's avatar
Laurent Montel committed
37
qt5_add_dbus_adaptor(korgac_SRCS org.kde.korganizer.KOrgac.xml koalarmclient.h
Laurent Montel's avatar
indent  
Laurent Montel committed
38 39
    KOAlarmClient
    )
40 41


Laurent Montel's avatar
Laurent Montel committed
42 43
file(GLOB ICONS_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/pixmaps/*-apps-korgac.png")
ecm_add_app_icon(korgac_SRCS ICONS ${ICONS_SRCS})
44

45
add_executable(korgac ${korgac_SRCS})
46
if( APPLE )
Laurent Montel's avatar
indent  
Laurent Montel committed
47 48 49 50 51 52 53 54 55
    set_target_properties(korgac PROPERTIES
        MACOSX_BUNDLE_INFO_PLIST ${CMAKE_SOURCE_DIR}/Info.plist.template
        )
    set_target_properties(korgac PROPERTIES
        MACOSX_BUNDLE_GUI_IDENTIFIER "org.kde.pim.korgac"
        )
    set_target_properties(korgac PROPERTIES
        MACOSX_BUNDLE_BUNDLE_NAME "KOrganizer Reminder Client"
        )
56
endif()
57 58

target_link_libraries(korgac
Laurent Montel's avatar
indent  
Laurent Montel committed
59 60 61 62 63 64 65 66 67 68 69 70 71
    KF5::AkonadiCalendar
    KF5::AkonadiMime
    KF5::CalendarSupport
    KF5::IncidenceEditor
    KF5::AkonadiCore
    KF5::CalendarCore
    KF5::CalendarUtils
    KF5::IdentityManagement
    KF5::MailTransport
    KF5::Codecs
    KF5::DBusAddons
    Phonon::phonon4qt5
    )
72

73
install(TARGETS
74
    korgac ${KDE_INSTALL_TARGETS_DEFAULT_ARGS}
Laurent Montel's avatar
indent  
Laurent Montel committed
75
    )
76

Allen Winter's avatar
Allen Winter committed
77
install(PROGRAMS
Laurent Montel's avatar
indent  
Laurent Montel committed
78 79 80
    org.kde.korgac.desktop
    DESTINATION ${KDE_INSTALL_AUTOSTARTDIR}
    )
Allen Winter's avatar
Allen Winter committed
81 82

install(FILES
Laurent Montel's avatar
indent  
Laurent Montel committed
83 84 85
    org.kde.korganizer.KOrgac.xml
    DESTINATION ${KDE_INSTALL_DBUSINTERFACEDIR}
    )
Laurent Montel's avatar
Laurent Montel committed
86 87 88
if ("${CMAKE_BINARY_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
  feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
endif()