CMakeLists.txt 2.03 KB
Newer Older
Laurent Montel's avatar
Laurent Montel committed
1
# KDE Application Version, managed by release script
2
set (RELEASE_SERVICE_VERSION_MAJOR "21")
3
set (RELEASE_SERVICE_VERSION_MINOR "11")
4
5
set (RELEASE_SERVICE_VERSION_MICRO "70")
set (RELEASE_SERVICE_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE_VERSION_MINOR}.${RELEASE_SERVICE_VERSION_MICRO}")
6
cmake_minimum_required (VERSION 3.16 FATAL_ERROR)
7
project(ktimer VERSION ${RELEASE_SERVICE_VERSION})
Laurent Montel's avatar
Laurent Montel committed
8

9
set (QT_MIN_VERSION "5.15.0")
10
set(KF5_MIN_VERSION "5.85.0")
Laurent Montel's avatar
Laurent Montel committed
11

12
find_package (ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE)
Laurent Montel's avatar
Laurent Montel committed
13
14
15
set (CMAKE_MODULE_PATH ${ECM_MODULE_PATH})

include(KDEInstallDirs)
16
include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE)
Laurent Montel's avatar
Laurent Montel committed
17
18
include(KDECMakeSettings)
include(ECMInstallIcons)
Laurent Montel's avatar
Laurent Montel committed
19
include(ECMAddAppIcon)
Laurent Montel's avatar
Laurent Montel committed
20
21
22
23
24
25

find_package (Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS
    Core
    Widgets
)

26
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
Laurent Montel's avatar
Laurent Montel committed
27
28
29
    DocTools
    I18n
    WidgetsAddons
30
    KIO
Laurent Montel's avatar
Laurent Montel committed
31
    DBusAddons
32
    Notifications
Laurent Montel's avatar
Laurent Montel committed
33
)
34
35

add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x050f00)
36
add_definitions(-DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x055600)
37

38
add_executable(ktimer)
39

Laurent Montel's avatar
Laurent Montel committed
40
41
configure_file(config-ktimer.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-ktimer.h)

42

Laurent Montel's avatar
Laurent Montel committed
43
target_sources(ktimer PRIVATE main.cpp ktimer.cpp ktimer.h)
Laurent Montel's avatar
Laurent Montel committed
44

45
ki18n_wrap_ui(ktimer prefwidget.ui )
Laurent Montel's avatar
Laurent Montel committed
46

Laurent Montel's avatar
Laurent Montel committed
47
file(GLOB ICONS_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/*-apps-ktimer.png")
48
ecm_add_app_icon(ktimer ICONS ${ICONS_SRCS})
49

Laurent Montel's avatar
Laurent Montel committed
50

Laurent Montel's avatar
Laurent Montel committed
51
target_link_libraries(ktimer  KF5::I18n KF5::KIOWidgets KF5::ConfigWidgets KF5::Notifications KF5::DBusAddons)
Laurent Montel's avatar
Laurent Montel committed
52

Laurent Montel's avatar
Laurent Montel committed
53
install(TARGETS ktimer  ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} )
Laurent Montel's avatar
Laurent Montel committed
54
55
56
57


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

Laurent Montel's avatar
Laurent Montel committed
58
install( PROGRAMS org.kde.ktimer.desktop  DESTINATION ${KDE_INSTALL_APPDIR})
59
install(FILES org.kde.ktimer.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR})
Laurent Montel's avatar
Laurent Montel committed
60

Laurent Montel's avatar
Laurent Montel committed
61
ecm_install_icons( ICONS 128-apps-ktimer.png  16-apps-ktimer.png  32-apps-ktimer.png  48-apps-ktimer.png DESTINATION ${KDE_INSTALL_ICONDIR} THEME hicolor  )
Laurent Montel's avatar
Laurent Montel committed
62

63
add_subdirectory(doc)
64
65
66
ki18n_install(po)
kdoctools_install(po)

Laurent Montel's avatar
Laurent Montel committed
67
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)