CMakeLists.txt 1.17 KB
Newer Older
1
cmake_minimum_required(VERSION 3.16)
2

3
project(Milou)
4
set(PROJECT_VERSION "5.24.90")
5
set(PROJECT_VERSION_MAJOR 5)
6

7
set(QT_MIN_VERSION "5.15.0")
Laurent Montel's avatar
Laurent Montel committed
8
set(KF5_MIN_VERSION "5.90")
9
set(KDE_COMPILERSETTINGS_LEVEL "5.82")
10

11
find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE)
12
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
13

Vishesh Handa's avatar
Vishesh Handa committed
14

15
16
17
include(FeatureSummary)
include(KDEInstallDirs)
include(KDECMakeSettings)
18
include(KDECompilerSettings NO_POLICY_SCOPE)
19
include(ECMAddTests)
20
include(GenerateExportHeader)
21
include(KDEClangFormat)
22
include(KDEGitCommitHooks)
23

Laurent Montel's avatar
Laurent Montel committed
24
25
26
find_package(Qt${QT_MAJOR_VERSION} ${QT_MIN_VERSION} REQUIRED NO_MODULE COMPONENTS Qml Quick Widgets)
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS CoreAddons I18n Declarative ItemModels Service Plasma Runner)

27
add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x050f00)
28

29
30
add_definitions(-DQT_NO_FOREACH -DQT_NO_KEYWORDS)

31
add_subdirectory(lib)
32
add_subdirectory(plasmoid)
33

34
35
36
# add clang-format target for all our real source files
file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES *.cpp *.h)
kde_clang_format(${ALL_CLANG_FORMAT_SOURCE_FILES})
37
kde_configure_git_pre_commit_hook(CHECKS CLANG_FORMAT)
38

39
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)