CMakeLists.txt 1.64 KB
Newer Older
Laurent Montel's avatar
Laurent Montel committed
1
cmake_minimum_required (VERSION 3.5 FATAL_ERROR)
2
3

set (RELEASE_SERVICE_VERSION_MAJOR "20")
4
set (RELEASE_SERVICE_VERSION_MINOR "07")
5
6
7
8
9
10
set (RELEASE_SERVICE_VERSION_MICRO "70")
set (RELEASE_SERVICE_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE_VERSION_MINOR}.${RELEASE_SERVICE_VERSION_MICRO}")
set (RELEASE_SERVICE_COMPACT_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}${RELEASE_SERVICE_VERSION_MINOR}${RELEASE_SERVICE_VERSION_MICRO}")

project(ksquares VERSION "0.6.${RELEASE_SERVICE_COMPACT_VERSION}")

11
12
set (QT_MIN_VERSION "5.7.0")
set (KF5_MIN_VERSION "5.30.0")
Laurent Montel's avatar
Laurent Montel committed
13

14
find_package(ECM ${KF5_MIN_VERSION} REQUIRED CONFIG)
Laurent Montel's avatar
Laurent Montel committed
15
16
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})

Michael Palimaka's avatar
Michael Palimaka committed
17
find_package(Qt5 ${QT_MIN_VERSION} REQUIRED NO_MODULE COMPONENTS Widgets)
Frederik Schwarzer's avatar
Frederik Schwarzer committed
18
19
20
21
22
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
    Config
    ConfigWidgets
    CoreAddons
    Crash
Michael Palimaka's avatar
Michael Palimaka committed
23
24
    DBusAddons
    DocTools
Frederik Schwarzer's avatar
Frederik Schwarzer committed
25
26
27
28
    I18n
    WidgetsAddons
    XmlGui
)
Laurent Montel's avatar
Laurent Montel committed
29
30
31
32

find_package(KF5KDEGames 4.9.0 REQUIRED)

include(FeatureSummary)
Laurent Montel's avatar
Laurent Montel committed
33
include(ECMAddAppIcon)
Laurent Montel's avatar
Laurent Montel committed
34
include(ECMInstallIcons)
35
include(ECMSetupVersion)
Laurent Montel's avatar
Laurent Montel committed
36
include(KDEInstallDirs)
37
include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE)
Laurent Montel's avatar
Laurent Montel committed
38
39
include(KDECMakeSettings)
include(ECMAddTests)
40
41
42
43
if (${KF5Config_VERSION} STRGREATER "5.56.0")
        add_definitions(-DQT_NO_FOREACH)
        MESSAGE(STATUS "compile without foreach")
endif()
44
45
if (EXISTS "${CMAKE_SOURCE_DIR}/.git")
   add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x060000)
46
   add_definitions(-DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x060000)
47
endif()
Laurent Montel's avatar
Laurent Montel committed
48

49
add_subdirectory(src)
Laurent Montel's avatar
Laurent Montel committed
50
add_subdirectory(doc)
51
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)