CMakeLists.txt 1.72 KB
Newer Older
1
cmake_minimum_required (VERSION 3.13 FATAL_ERROR)
Laurent Montel's avatar
Laurent Montel committed
2

3
# KDE Application Version, managed by release script
4
set(RELEASE_SERVICE_VERSION_MAJOR "21")
5
6
set(RELEASE_SERVICE_VERSION_MINOR "04")
set(RELEASE_SERVICE_VERSION_MICRO "0")
7
set(RELEASE_SERVICE_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE_VERSION_MINOR}.${RELEASE_SERVICE_VERSION_MICRO}")
8

9
project(kgeography VERSION ${RELEASE_SERVICE_VERSION})
David Gil's avatar
David Gil committed
10
11

# minimal Qt requirement
12
13
set(QT_MIN_VERSION "5.12.0") # Remember to update the QT_DEPRECATED_WARNINGS_SINCE below
set(KF5_REQUIRED_VERSION "5.62.0") # Remember to update the KF_DEPRECATED_WARNINGS_SINCE below
David Gil's avatar
David Gil committed
14
15

# ECM
16
find_package (ECM ${KF5_REQUIRED_VERSION} REQUIRED NO_MODULE)
David Gil's avatar
David Gil committed
17
18
19
20

# where to look first for cmake modules
set (CMAKE_MODULE_PATH ${ECM_MODULE_PATH})

21
find_package (Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED Core Widgets)
David Gil's avatar
David Gil committed
22

23
find_package (KF5 ${KF5_REQUIRED_VERSION} REQUIRED COMPONENTS
24
    XmlGui WidgetsAddons CoreAddons ConfigWidgets I18n ItemViews IconThemes Crash DocTools
David Gil's avatar
David Gil committed
25
26
27
)

include(KDEInstallDirs)
28
include(KDECompilerSettings NO_POLICY_SCOPE)
David Gil's avatar
David Gil committed
29
30
include(KDECMakeSettings)
include(FeatureSummary)
Laurent Montel's avatar
Laurent Montel committed
31
include(ECMAddAppIcon)
32
include(ECMInstallIcons)
33
include(ECMSetupVersion)
34

35
add_definitions(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS)
36
add_definitions(-DQT_NO_URL_CAST_FROM_STRING)
37
38
add_definitions(-DQT_DEPRECATED_WARNINGS_SINCE=0x050C00)
add_definitions(-DKF_DEPRECATED_WARNINGS_SINCE=0x053E00)
39

David Gil's avatar
David Gil committed
40
41
# global include directories
include_directories (${CMAKE_CURRENT_BINARY_DIR})
42

43
add_subdirectory( doc )
Laurent Montel's avatar
Laurent Montel committed
44
45
46
add_subdirectory( src ) 
add_subdirectory( data ) 
add_subdirectory( icons ) 
Laurent Montel's avatar
Laurent Montel committed
47

Andreas Cord-Landwehr's avatar
Andreas Cord-Landwehr committed
48
ki18n_install(po)
49
50
51
if (KF5DocTools_FOUND)
    kdoctools_install(po)
endif()
Andreas Cord-Landwehr's avatar
Andreas Cord-Landwehr committed
52

Laurent Montel's avatar
Laurent Montel committed
53
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)