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

3
# Release Service version, managed by release script
4
set (RELEASE_SERVICE_VERSION_MAJOR "21")
5
set (RELEASE_SERVICE_VERSION_MINOR "07")
6
7
8
9
10
11
12
13
set (RELEASE_SERVICE_VERSION_MICRO "70")
set (RELEASE_SERVICE_COMPACT_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}${RELEASE_SERVICE_VERSION_MINOR}${RELEASE_SERVICE_VERSION_MICRO}")

# Bump KONVERSATION_BASE_VERSION once new features are added
set(KONVERSATION_BASE_VERSION "1.8")
set(KONVERSATION_VERSION "${KONVERSATION_BASE_VERSION}.${RELEASE_SERVICE_COMPACT_VERSION}")

project(konversation VERSION ${KONVERSATION_VERSION})
Eli MacKenzie's avatar
Eli MacKenzie committed
14

15
set (QT_MIN_VERSION "5.12.0")
16
set(KF5_MIN_VERSION "5.74.0")
Eike Hein's avatar
Eike Hein committed
17

Laurent Montel's avatar
Laurent Montel committed
18
find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE)
19
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH})
Eike Hein's avatar
Eike Hein committed
20

Eli MacKenzie's avatar
Eli MacKenzie committed
21
include(CheckIncludeFile)
Eike Hein's avatar
Eike Hein committed
22
23
include(KDEInstallDirs)
include(KDECMakeSettings)
24
include(KDECompilerSettings NO_POLICY_SCOPE)
Eike Hein's avatar
Eike Hein committed
25
include(ECMInstallIcons)
26
include(ECMSetupVersion)
Eike Hein's avatar
Eike Hein committed
27
include(FeatureSummary)
Eli MacKenzie's avatar
Eli MacKenzie committed
28

29
find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED Core Network Widgets)
Eli MacKenzie's avatar
Eli MacKenzie committed
30

31
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED
Eike Hein's avatar
Eike Hein committed
32
    Archive
Eike Hein's avatar
Eike Hein committed
33
    Bookmarks
Eike Hein's avatar
Eike Hein committed
34
35
    Config
    ConfigWidgets
Eike Hein's avatar
Eike Hein committed
36
    CoreAddons
37
    Crash
38
    DocTools
Eike Hein's avatar
Eike Hein committed
39
40
41
42
43
44
45
    I18n
    IdleTime
    NotifyConfig
    KIO
    Parts
    Wallet
    WidgetsAddons
Peter Simonsson's avatar
Peter Simonsson committed
46
    GlobalAccel
47
    DBusAddons
48
    NewStuff
49
50
51
    Notifications
    WindowSystem
    ItemViews
Eike Hein's avatar
Eike Hein committed
52
)
53

Eike Hein's avatar
Eike Hein committed
54
find_package(Phonon4Qt5 4.6.60 REQUIRED)
Eli MacKenzie's avatar
Eli MacKenzie committed
55

56
57
find_package(Qca-qt5 2.1.0)
set_package_properties(Qca-qt5 PROPERTIES DESCRIPTION "Support for encryption"
58
                       URL "https://download.kde.org/stable/qca/"
Eike Hein's avatar
Eike Hein committed
59
                       TYPE OPTIONAL)
60
check_include_file("stropts.h" HAVE_STROPTS_H)
61

62
63
set(HAVE_QCA2 ${Qca-qt5_FOUND})

64
configure_file(config-konversation.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-konversation.h )
Eike Hein's avatar
Eike Hein committed
65
66
67
68
69
include_directories(${CMAKE_CURRENT_BINARY_DIR})

add_definitions(
  -DQT_USE_QSTRINGBUILDER
  -DQT_STRICT_ITERATORS
70
71
  -DQT_NO_URL_CAST_FROM_STRING
  -DQT_NO_CAST_FROM_BYTEARRAY
72
73
  -DQT_NO_CAST_TO_ASCII
  -DQT_NO_CAST_FROM_ASCII
74
# -DQT_NO_SIGNALS_SLOTS_KEYWORDS FIXME KF5 Port: QCA includes cause trouble.
Friedrich W. H. Kossebau's avatar
Friedrich W. H. Kossebau committed
75
  -DQT_NO_FOREACH
76
  -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT
Eike Hein's avatar
Eike Hein committed
77
)
Eli MacKenzie's avatar
Eli MacKenzie committed
78
79

add_subdirectory(src)
Eli MacKenzie's avatar
Eli MacKenzie committed
80
add_subdirectory(data)
Bernd Buschinski's avatar
Bernd Buschinski committed
81
add_subdirectory(doc)
82

Eike Hein's avatar
Eike Hein committed
83
ki18n_install(po)
84
kdoctools_install(po)
85

Eike Hein's avatar
Eike Hein committed
86
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)