CMakeLists.txt 1.34 KB
Newer Older
1
# 3.1 is required for `target_sources`.
2
cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
Hannah von Reth's avatar
Hannah von Reth committed
3

4
project(kate)
5

6
set(QT_MIN_VERSION "5.4.0")
7
set(KF5_DEP_VERSION "5.40.0")
8

9 10 11 12 13
# KDE Applications version, managed by release script.
set(KDE_APPLICATIONS_VERSION_MAJOR "19")
set(KDE_APPLICATIONS_VERSION_MINOR "11")
set(KDE_APPLICATIONS_VERSION_MICRO "70")
set(KDE_APPLICATIONS_VERSION "${KDE_APPLICATIONS_VERSION_MAJOR}.${KDE_APPLICATIONS_VERSION_MINOR}.${KDE_APPLICATIONS_VERSION_MICRO}")
14

15 16
# We need some parts of the ECM CMake helpers.
find_package(ECM ${KF5_DEP_VERSION} QUIET REQUIRED NO_MODULE)
17

18 19
# We append to the module path so modules can be overriden from the command line.
list(APPEND CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
20

21 22 23 24
# Allow adding Qt resource files with `add_executable` or `target_sources` instead of 
# `qt5_add_resources`. See https://cmake.org/cmake/help/v3.0/manual/cmake-qt.7.html#autorcc.
set(CMAKE_AUTORCC ON)

25 26 27
include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE)
include(KDEInstallDirs)
include(KDECMakeSettings)
28

29 30 31
include(ECMOptionalAddSubdirectory)
include(ECMAddAppIcon)
include(ECMInstallIcons)
32

33
include(FeatureSummary)
34

35 36 37 38
ecm_optional_add_subdirectory(addons)
ecm_optional_add_subdirectory(kwrite)
ecm_optional_add_subdirectory(kate)
ecm_optional_add_subdirectory(doc)
39

40
feature_summary(INCLUDE_QUIET_PACKAGES WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)