CMakeLists.txt 2.04 KB
Newer Older
Laurent Montel's avatar
Laurent Montel committed
1
# KDE Application Version, managed by release script
2
set (RELEASE_SERVICE_VERSION_MAJOR "20")
3
set (RELEASE_SERVICE_VERSION_MINOR "07")
4
5
set (RELEASE_SERVICE_VERSION_MICRO "70")
set (RELEASE_SERVICE_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE_VERSION_MINOR}.${RELEASE_SERVICE_VERSION_MICRO}")
Laurent Montel's avatar
Laurent Montel committed
6
cmake_minimum_required (VERSION 3.5 FATAL_ERROR)
7
project(kdebugsettings VERSION ${RELEASE_SERVICE_VERSION})
Laurent Montel's avatar
Laurent Montel committed
8

Laurent Montel's avatar
Laurent Montel committed
9
10
set(QT_MIN_VERSION "5.13.0")
set(KF5_MIN_VERSION "5.68.0")
Laurent Montel's avatar
Laurent Montel committed
11

12
set(ECM_VERSION ${KF5_MIN_VERSION})
Laurent Montel's avatar
Laurent Montel committed
13
14

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

Laurent Montel's avatar
Minor    
Laurent Montel committed
17

Laurent Montel's avatar
Laurent Montel committed
18
find_package(Qt5 ${QT_MIN_VERSION} REQUIRED NO_MODULE COMPONENTS Widgets Test)
19
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS 
Laurent Montel's avatar
Laurent Montel committed
20
    CoreAddons 
Laurent Montel's avatar
Laurent Montel committed
21
    Config
Laurent Montel's avatar
Laurent Montel committed
22
23
    DBusAddons 
    I18n 
Laurent Montel's avatar
Laurent Montel committed
24
    WidgetsAddons
Laurent Montel's avatar
Laurent Montel committed
25
    ItemViews
Michael Palimaka's avatar
Michael Palimaka committed
26
    Completion)
Laurent Montel's avatar
Laurent Montel committed
27
include(FeatureSummary)
Laurent Montel's avatar
Laurent Montel committed
28
include(ECMAddAppIcon)
Laurent Montel's avatar
Laurent Montel committed
29
30
include(ECMInstallIcons)
include(KDEInstallDirs)
31
include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE)
Laurent Montel's avatar
Laurent Montel committed
32
include(KDECMakeSettings)
Laurent Montel's avatar
Laurent Montel committed
33
include(ECMAddTests)
34
include(ECMQtDeclareLoggingCategory)
Laurent Montel's avatar
Laurent Montel committed
35
include(GenerateExportHeader)
Laurent Montel's avatar
Laurent Montel committed
36

37

Laurent Montel's avatar
Laurent Montel committed
38
add_definitions(-DTRANSLATION_DOMAIN="kdebugsettings")
Laurent Montel's avatar
Laurent Montel committed
39
add_definitions(-DQT_NO_FOREACH)
40
41
42
43
if (EXISTS "${CMAKE_SOURCE_DIR}/.git")
   add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x060000)
   add_definitions(-DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x060000)
endif()
44

45

Laurent Montel's avatar
Laurent Montel committed
46
configure_file(config-kdebugsettings.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-kdebugsettings.h)
Laurent Montel's avatar
Laurent Montel committed
47

48
set(KDEBUGSETTINGS_LIB_VERSION "${RELEASE_SERVICE_VERSION}")
Laurent Montel's avatar
Laurent Montel committed
49
50
set(KDEBUGSETTINGS_LIB_SOVERSION "5")

51
if(BUILD_TESTING)
Laurent Montel's avatar
Laurent Montel committed
52
	add_definitions(-DBUILD_TESTING)
53
54
endif(BUILD_TESTING)

Laurent Montel's avatar
Laurent Montel committed
55

Laurent Montel's avatar
Laurent Montel committed
56
add_subdirectory( src )
Laurent Montel's avatar
Laurent Montel committed
57
if (BUILD_TESTING)
Laurent Montel's avatar
Laurent Montel committed
58
	add_subdirectory( autotests )
Laurent Montel's avatar
Laurent Montel committed
59
endif()
Laurent Montel's avatar
Laurent Montel committed
60
ecm_qt_install_logging_categories(EXPORT KDEBUGSETTINGS FILE kdebugsettings.categories DESTINATION ${KDE_INSTALL_LOGGINGCATEGORIESDIR})
Laurent Montel's avatar
Laurent Montel committed
61

Laurent Montel's avatar
Laurent Montel committed
62
install( FILES data/kde.renamecategories DESTINATION ${KDE_INSTALL_LOGGINGCATEGORIESDIR} )
Laurent Montel's avatar
Laurent Montel committed
63
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)