CMakeLists.txt 2.21 KB
Newer Older
Laurent Montel's avatar
Laurent Montel committed
1
# KDE Application Version, managed by release script
2
3
4
5
set (RELEASE_SERVICE_VERSION_MAJOR "20")
set (RELEASE_SERVICE_VERSION_MINOR "03")
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
set(QT_MIN_VERSION "5.12.0")
Laurent Montel's avatar
Laurent Montel committed
10
set(KF5_MIN_VERSION "5.66.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
44
if (EXISTS "${CMAKE_SOURCE_DIR}/.git")
   add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x060000)
   add_definitions(-DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x060000)
endif()

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

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

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

Laurent Montel's avatar
Laurent Montel committed
54

Laurent Montel's avatar
Laurent Montel committed
55
add_subdirectory( src )
Laurent Montel's avatar
Laurent Montel committed
56
if (BUILD_TESTING)
Laurent Montel's avatar
Laurent Montel committed
57
	add_subdirectory( autotests )
Laurent Montel's avatar
Laurent Montel committed
58
endif()
59
60
61
62
63
if (NOT ECM_VERSION VERSION_LESS "5.68.0")
   ecm_qt_install_logging_categories(EXPORT KDEBUGSETTINGS FILE kdebugsettings.categories DESTINATION ${KDE_INSTALL_LOGGINGCATEGORIESDIR})
else()
   install( FILES data/kdebugsettings.categories DESTINATION ${KDE_INSTALL_LOGGINGCATEGORIESDIR} )
endif()
Laurent Montel's avatar
Laurent Montel committed
64

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