CMakeLists.txt 3.07 KB
Newer Older
1
# Konsole project
2
3

# KDE Application Version, managed by release script
4
5
set (RELEASE_SERVICE_VERSION_MAJOR "21")
set (RELEASE_SERVICE_VERSION_MINOR "03")
6
7
set (RELEASE_SERVICE_VERSION_MICRO "70")
set (RELEASE_SERVICE_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE_VERSION_MINOR}.${RELEASE_SERVICE_VERSION_MICRO}")
Christophe Giboudeaux's avatar
Build.    
Christophe Giboudeaux committed
8

9
10
# Do not increase these requirements without a merge-request or/and
# approval from maintainer(s).
11
# minimal requirements
12
cmake_minimum_required (VERSION 3.0 FATAL_ERROR)
13
# Qt 5.12 LTS EOL December 2021
14
set (QT_MIN_VERSION "5.12.0")
Kurt Hindenburg's avatar
Kurt Hindenburg committed
15

Kurt Hindenburg's avatar
Kurt Hindenburg committed
16
17
# Ubuntu 20.04 LTS only has KF 5.68 and Qt 5.12
set (KF5_MIN_VERSION "5.68.0")
18

19
# Release script will create bugzilla versions
20
project(konsole VERSION ${RELEASE_SERVICE_VERSION})
21

22
find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE)
23
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH})
Stephen Kelly's avatar
Stephen Kelly committed
24
25
26

include(KDEInstallDirs)
include(KDECMakeSettings)
27
include(KDECompilerSettings NO_POLICY_SCOPE)
28
include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE)
29
30
31
32
33
34
35
include(ECMOptionalAddSubdirectory)
include(ECMInstallIcons)
include(ECMSetupVersion)
include(ECMMarkNonGuiExecutable)
include(ECMGenerateHeaders)
include(GenerateExportHeader)
include(FeatureSummary)
36
include(ECMQtDeclareLoggingCategory)
37

38
39
ecm_setup_version(${RELEASE_SERVICE_VERSION} VARIABLE_PREFIX KONSOLEPRIVATE
    SOVERSION ${RELEASE_SERVICE_VERSION_MAJOR}
40
)
41
42
43
44
45
46
find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED
    Core
    DBus
    PrintSupport
    Widgets
)
Stephen Kelly's avatar
Stephen Kelly committed
47

Kurt Hindenburg's avatar
Kurt Hindenburg committed
48
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED
49
    Bookmarks Completion Config ConfigWidgets
50
    CoreAddons Crash GuiAddons DBusAddons
51
    I18n IconThemes Init KIO NewStuff NewStuffCore Notifications NotifyConfig
52
    Parts Pty Service TextWidgets WidgetsAddons
53
    WindowSystem XmlGui DBusAddons GlobalAccel
Alex Richardson's avatar
Alex Richardson committed
54
)
55

56
find_package(KF5DocTools ${KF5_MIN_VERSION})
57
set_package_properties(KF5DocTools PROPERTIES DESCRIPTION
58
59
60
61
    "Tools to generate documentation"
    TYPE OPTIONAL
)

62
63
64
65
if(NOT APPLE)
    find_package(X11)
    set_package_properties(X11 PROPERTIES TYPE OPTIONAL)
endif()
66
67
set(HAVE_X11 ${X11_FOUND})

68
# See above includes for defaults
69
add_definitions(
70
  -DQT_NO_FOREACH
71
72
73
  -DQT_STRICT_ITERATORS
  -DQT_NO_URL_CAST_FROM_STRING
)
74

Kurt Hindenburg's avatar
Kurt Hindenburg committed
75
set(CMAKE_CXX_STANDARD 17)
Kurt Hindenburg's avatar
Kurt Hindenburg committed
76
77
78
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

79
include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} )
80

Albert Astals Cid's avatar
Albert Astals Cid committed
81
82
file(GLOB ICONS_SRCS "data/icons/*.png")

83
84
add_subdirectory( src )
add_subdirectory( data )
Robert Knight's avatar
Robert Knight committed
85
add_subdirectory( desktop )
86
87
88
if (KF5DocTools_FOUND)
    add_subdirectory( doc/manual )
endif()
89

90
add_subdirectory( tools )
91

Albert Astals Cid's avatar
Albert Astals Cid committed
92
93
94
95
96
97
98
# Conditionally install icons for Linux as they may not be provided by the user theme
option(INSTALL_ICONS "Install icons" OFF)
if (INSTALL_ICONS)
    include(ECMInstallIcons)
    ecm_install_icons( ICONS ${ICONS_SRCS} DESTINATION ${KDE_INSTALL_ICONDIR} )
endif()

99
100
101
102
103
104

if (${ECM_VERSION} STRGREATER "5.58.0")
    install( FILES konsole.categories DESTINATION ${KDE_INSTALL_LOGGINGCATEGORIESDIR} )
else()
    install( FILES konsole.categories DESTINATION ${KDE_INSTALL_CONFDIR} )
endif()
Laurent Montel's avatar
Laurent Montel committed
105

Alex Richardson's avatar
Alex Richardson committed
106
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)