CMakeLists.txt 1.99 KB
Newer Older
1
cmake_minimum_required (VERSION 3.16 FATAL_ERROR)
2
3

# KDE Application Version, managed by release script
4
set(RELEASE_SERVICE_VERSION_MAJOR "21")
5
set(RELEASE_SERVICE_VERSION_MINOR "11")
6
7
set(RELEASE_SERVICE_VERSION_MICRO "70")
set(RELEASE_SERVICE_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE_VERSION_MINOR}.${RELEASE_SERVICE_VERSION_MICRO}")
8

9
project(kcharselect VERSION ${RELEASE_SERVICE_VERSION})
Laurent Montel's avatar
Laurent Montel committed
10

11
set (QT_MIN_VERSION "5.15.0")
12
set (KF5_MIN_VERSION "5.85.0")
Laurent Montel's avatar
Laurent Montel committed
13

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

Christoph Feck's avatar
Christoph Feck committed
17
18
include(KDEInstallDirs)
include(KDECMakeSettings)
19
include(KDECompilerSettings NO_POLICY_SCOPE)
20
include(ECMSetupVersion)
21
22
include(KDEClangFormat)
include(KDEGitCommitHooks)
Christoph Feck's avatar
Christoph Feck committed
23
24
25
26
27
28

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

Christoph Feck's avatar
Christoph Feck committed
29
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
Christoph Feck's avatar
Christoph Feck committed
30
    Bookmarks
31
    Crash
Christoph Feck's avatar
Christoph Feck committed
32
33
34
35
36
37
    DocTools
    I18n
    WidgetsAddons
    XmlGui
)

38
ecm_setup_version(${RELEASE_SERVICE_VERSION} VARIABLE_PREFIX KCHARSELECT VERSION_HEADER kcharselect_version.h)
39

40
41
42
43
44
45
46
add_definitions(
    -DQT_DISABLE_DEPRECATED_BEFORE=0x050F00
    -DQT_DEPRECATED_WARNINGS_SINCE=0x060000
    -DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x055500
    -DKF_DEPRECATED_WARNINGS_SINCE=0x060000
)

47
48
49
50
51
add_executable(kcharselect)

target_sources(kcharselect PRIVATE
    kcharselectdia.cc
    main.cc
52

53
54
    kcharselect.qrc
)
Laurent Montel's avatar
Laurent Montel committed
55

56
57
58
59
60
61
62
target_link_libraries(kcharselect
    KF5::Bookmarks
    KF5::Crash
    KF5::I18n
    KF5::WidgetsAddons
    KF5::XmlGui
)
Laurent Montel's avatar
Laurent Montel committed
63

Nicolas Fella's avatar
Nicolas Fella committed
64
install(TARGETS kcharselect ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
Laurent Montel's avatar
Laurent Montel committed
65

Nicolas Fella's avatar
Nicolas Fella committed
66
install(PROGRAMS org.kde.kcharselect.desktop  DESTINATION ${KDE_INSTALL_APPDIR})
67
install(FILES org.kde.kcharselect.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR})
Laurent Montel's avatar
Laurent Montel committed
68

69
add_subdirectory(doc)
70

Laurent Montel's avatar
Laurent Montel committed
71
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
72
73
74
75
76

file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES *.cc *.h)
kde_clang_format(${ALL_CLANG_FORMAT_SOURCE_FILES})

kde_configure_git_pre_commit_hook(CHECKS CLANG_FORMAT)