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

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

9
project(kturtle VERSION ${RELEASE_SERVICE_VERSION})
10

11
12
set(QT_MIN_VERSION "5.15.0")
set(KF5_MIN_VERSION "5.83.0")
Inge Wallin's avatar
Inge Wallin committed
13

14
15

find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE)
16

Inge Wallin's avatar
Inge Wallin committed
17
18
19
set(CMAKE_MODULE_PATH
    ${CMAKE_MODULE_PATH}
    ${ECM_MODULE_PATH}
20
    
Inge Wallin's avatar
Inge Wallin committed
21
22
)
include(KDEInstallDirs)
23
include(KDECompilerSettings NO_POLICY_SCOPE)
Inge Wallin's avatar
Inge Wallin committed
24
25
include(KDECMakeSettings)
include(FeatureSummary)
26
include(ECMAddAppIcon)
27
28
include(ECMSetupVersion)

Inge Wallin's avatar
Inge Wallin committed
29
30
31
32
33
find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS
    Core
    Gui
    Svg
    Widgets
Albert Astals Cid's avatar
Albert Astals Cid committed
34
    PrintSupport
Inge Wallin's avatar
Inge Wallin committed
35
)
36

37
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED
38
    Crash
Inge Wallin's avatar
Inge Wallin committed
39
40
    KIO
    NewStuff
Albert Astals Cid's avatar
Albert Astals Cid committed
41
42
    DocTools
    TextWidgets
Inge Wallin's avatar
Inge Wallin committed
43
    I18n
44
    CoreAddons
Inge Wallin's avatar
Inge Wallin committed
45
46
47
48
)

#Allows QString concatenation to use a single memory allocation per source line.
add_definitions(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS)
49
add_definitions(-DQT_NO_URL_CAST_FROM_STRING)
50

51
add_subdirectory (doc)
52
53
add_subdirectory (src)
add_subdirectory (icons)
54

Andreas Cord-Landwehr's avatar
Andreas Cord-Landwehr committed
55
ki18n_install(po)
56
57
kdoctools_install(po)

58
install(FILES org.kde.kturtle.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR})
Laurent Montel's avatar
Laurent Montel committed
59
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)