CMakeLists.txt 1.9 KB
Newer Older
1 2
cmake_minimum_required (VERSION 3.5 FATAL_ERROR)

3
project(konversation)
Eli MacKenzie's avatar
Eli MacKenzie committed
4

5
set (QT_MIN_VERSION "5.12.0")
6
set(KF5_MIN_VERSION "5.71.0")
Eike Hein's avatar
Eike Hein committed
7

Laurent Montel's avatar
Laurent Montel committed
8
find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE)
9
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH})
Eike Hein's avatar
Eike Hein committed
10

Eli MacKenzie's avatar
Eli MacKenzie committed
11
include(CheckIncludeFile)
Eike Hein's avatar
Eike Hein committed
12 13
include(KDEInstallDirs)
include(KDECMakeSettings)
14
include(KDECompilerSettings NO_POLICY_SCOPE)
Eike Hein's avatar
Eike Hein committed
15 16
include(ECMInstallIcons)
include(FeatureSummary)
Eli MacKenzie's avatar
Eli MacKenzie committed
17

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

20
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED
Eike Hein's avatar
Eike Hein committed
21
    Archive
Eike Hein's avatar
Eike Hein committed
22
    Bookmarks
Eike Hein's avatar
Eike Hein committed
23 24
    Config
    ConfigWidgets
Eike Hein's avatar
Eike Hein committed
25
    CoreAddons
26
    Crash
27
    DocTools
Eike Hein's avatar
Eike Hein committed
28 29 30 31 32 33 34 35
    I18n
    IdleTime
    NotifyConfig
    KIO
    Parts
    Solid
    Wallet
    WidgetsAddons
Peter Simonsson's avatar
Peter Simonsson committed
36
    GlobalAccel
37
    DBusAddons
38 39 40
    Notifications
    WindowSystem
    ItemViews
Eike Hein's avatar
Eike Hein committed
41
)
42

Eike Hein's avatar
Eike Hein committed
43 44
find_package(Phonon4Qt5 4.6.60 REQUIRED)
include_directories(${PHONON_INCLUDES})
Eli MacKenzie's avatar
Eli MacKenzie committed
45

46 47
find_package(Qca-qt5 2.1.0)
set_package_properties(Qca-qt5 PROPERTIES DESCRIPTION "Support for encryption"
48
                       URL "https://download.kde.org/stable/qca/"
Eike Hein's avatar
Eike Hein committed
49
                       TYPE OPTIONAL)
50 51 52
check_include_file("stropts.h" HAVE_STROPTS_H)
check_include_file("byteswap.h" HAVE_BYTESWAP_H)
check_include_file("sys/endian.h" HAVE_SYS_ENDIAN_H)
53

54 55
set(HAVE_QCA2 ${Qca-qt5_FOUND})

56
configure_file(config-konversation.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-konversation.h )
Eike Hein's avatar
Eike Hein committed
57 58 59 60 61
include_directories(${CMAKE_CURRENT_BINARY_DIR})

add_definitions(
  -DQT_USE_QSTRINGBUILDER
  -DQT_STRICT_ITERATORS
62 63
  -DQT_NO_URL_CAST_FROM_STRING
  -DQT_NO_CAST_FROM_BYTEARRAY
64 65
  -DQT_NO_CAST_TO_ASCII
  -DQT_NO_CAST_FROM_ASCII
66
# -DQT_NO_SIGNALS_SLOTS_KEYWORDS FIXME KF5 Port: QCA includes cause trouble.
Friedrich W. H. Kossebau's avatar
Friedrich W. H. Kossebau committed
67
  -DQT_NO_FOREACH
68
  -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT
Eike Hein's avatar
Eike Hein committed
69
)
Eli MacKenzie's avatar
Eli MacKenzie committed
70 71

add_subdirectory(src)
Eli MacKenzie's avatar
Eli MacKenzie committed
72
add_subdirectory(data)
Bernd Buschinski's avatar
Bernd Buschinski committed
73
add_subdirectory(doc)
74

Eike Hein's avatar
Eike Hein committed
75
ki18n_install(po)
76
kdoctools_install(po)
77

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