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

# KDE Application Version, managed by release script
4
set (RELEASE_SERVICE_VERSION_MAJOR "20")
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}")
Christophe Giboudeaux's avatar
Build.    
Christophe Giboudeaux committed
8

9
# minimal requirements
10
cmake_minimum_required (VERSION 3.0 FATAL_ERROR)
11
12
# Qt 5.12 LTS EOL May 2021
set (QT_MIN_VERSION "5.12.0")
Kurt Hindenburg's avatar
Kurt Hindenburg committed
13

14
15
# The exact version required is not known ATM
set (KF5_MIN_VERSION "5.6.0")
16

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

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

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

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

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

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

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

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

Kurt Hindenburg's avatar
Kurt Hindenburg committed
73
74
75
76
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

77
include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} )
78

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

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

88
add_subdirectory( tools )
89

Albert Astals Cid's avatar
Albert Astals Cid committed
90
91
92
93
94
95
96
# 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()

97
98
99
100
101
102

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
103

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