-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathCMakeLists.txt
70 lines (55 loc) · 2.02 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
cmake_minimum_required(VERSION 3.0 FATAL_ERROR)
find_package(ECM 5.45.0 REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules ${ECM_MODULE_PATH})
include(SetKReportCMakePolicies NO_POLICY_SCOPE)
project(KReport VERSION 3.2.90) # Update this: Alpha = 90, Beta 1 = 91, RC 1 = 94
include(KReportAddTests)
include(KReportAddExamples)
kreport_add_tests(OFF)
kreport_add_examples(OFF)
# CMake
include(CMakePackageConfigHelpers)
# ECM
include(ECMGeneratePriFile)
include(ECMPoQmTools)
include(ECMSetupVersion)
include(ECMInstallIcons)
include(ECMOptionalAddSubdirectory)
include(KDEInstallDirs)
include(KDECMakeSettings NO_POLICY_SCOPE)
include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE)
include(ECMSetupQtPluginMacroNames)
include(ECMAddQch)
# Own
include(KReportAddIconsRccFile)
include(KReportMacros)
simple_option(BUILD_QCH "Build API documentation in QCH format" OFF)
# Dependencies
set(REQUIRED_QT_VERSION 5.4.0)
set(REQUIRED_KF5_VERSION 5.44.0)
set(REQUIRED_KPROPERTY_VERSION ${PROJECT_VERSION})
# Required components to build this framework
# TODO move Widgets/KF5WidgetsAddons-dependent part to a libKReportDesigner
find_package(Qt5 ${REQUIRED_QT_VERSION} NO_MODULE REQUIRED Core Widgets Xml PrintSupport)
find_package(KF5 ${REQUIRED_KF5_VERSION} REQUIRED CoreAddons WidgetsAddons GuiAddons Config)
find_package(KPropertyWidgets ${REQUIRED_KPROPERTY_VERSION} COMPONENTS KF)
set_package_properties(KPropertyWidgets PROPERTIES TYPE REQUIRED
PURPOSE "Required by KReport for handling properties")
get_git_revision_and_branch()
add_unfinished_features_option()
ecm_setup_qtplugin_macro_names(
JSON_ARG2 KREPORT_PLUGIN_FACTORY
CONFIG_CODE_VARIABLE KREPORT_SETUP_AUTOMOC_VARIABLES
)
add_subdirectory(src)
if(BUILD_TESTING)
add_subdirectory(autotests)
#add_subdirectory(tests)
endif()
if(BUILD_EXAMPLES)
add_subdirectory(examples)
endif()
if (IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/poqm")
ecm_install_po_files_as_qm(poqm)
endif()
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)