CMakeLists.txt 1.21 KB
Newer Older
1
project(user-manager)
Vishesh Handa's avatar
Vishesh Handa committed
2
cmake_minimum_required(VERSION 2.8.12)
3
set(PROJECT_VERSION "5.18.4")
Vishesh Handa's avatar
Vishesh Handa committed
4

5
set(QT_MIN_VERSION "5.12.0")
6
set(KF5_MIN_VERSION "5.66.0")
Laurent Montel's avatar
Laurent Montel committed
7
8

find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE)
Vishesh Handa's avatar
Vishesh Handa committed
9
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
Àlex Fiestas's avatar
Àlex Fiestas committed
10
SET(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules" ${CMAKE_MODULE_PATH})
11

Laurent Montel's avatar
Laurent Montel committed
12
find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED  COMPONENTS Core Widgets DBus)
Volker Krause's avatar
Volker Krause committed
13
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED WidgetsAddons CoreAddons I18n Config ConfigWidgets KCMUtils KIO Auth)
Àlex Fiestas's avatar
Àlex Fiestas committed
14
find_package(PWQuality REQUIRED)
15

Vishesh Handa's avatar
Vishesh Handa committed
16
17
18
include(FeatureSummary)
include(KDEInstallDirs)
include(KDECMakeSettings)
Laurent Montel's avatar
Laurent Montel committed
19
include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE)
20
include(KDEClangFormat)
21
include(ECMQtDeclareLoggingCategory)
22

Vishesh Handa's avatar
Vishesh Handa committed
23
include_directories(${PWQUALITY_INCLUDE_DIR})
24

Lasse Liehu's avatar
Lasse Liehu committed
25
26
27
# Set KI18n translation domain
add_definitions(-DTRANSLATION_DOMAIN=\"user_manager\")

28
add_subdirectory(src)
Vishesh Handa's avatar
Vishesh Handa committed
29

Laurent Montel's avatar
Laurent Montel committed
30
install(FILES user-manager.categories  DESTINATION  ${KDE_INSTALL_LOGGINGCATEGORIESDIR})
31

32
33
34
35
# 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})

Vishesh Handa's avatar
Vishesh Handa committed
36
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)