2 if(${CMAKE_SOURCE_DIR} STREQUAL ${sieveeditor_SOURCE_DIR})
3 cmake_minimum_required(VERSION 3.1)
4 set(KF5_VERSION "5.23.0")
5 find_package(ECM ${KF5_VERSION} REQUIRED NO_MODULE)
6 set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
7 include(ECMInstallIcons)
9 include(ECMOptionalAddSubdirectory)
10 include(ECMSetupVersion)
12 include(ECMMarkNonGuiExecutable)
13 include(GenerateExportHeader)
14 include(ECMGenerateHeaders)
15 include(CMakePackageConfigHelpers)
16 include(FeatureSummary)
17 include(CheckFunctionExists)
18 include(ECMGeneratePriFile)
20 include(KDEInstallDirs)
21 include(KDECMakeSettings)
22 include(KDECompilerSettings NO_POLICY_SCOPE)
23 include(ECMAddAppIcon)
24 include(ECMQtDeclareLoggingCategory)
27 set(KDEPIM_DEV_VERSION )
30 if(DEFINED KDEPIM_DEV_VERSION)
31 set(KDEPIM_DEV_VERSION " ${KDEPIM_DEV_VERSION}")
35 set(KDEPIM_VERSION_NUMBER "5.3.0")
36 set(KDEPIM_VERSION "${KDEPIM_VERSION_NUMBER}${KDEPIM_DEV_VERSION}")
38 set(KMAILTRANSPORT_LIB_VERSION "5.3.0")
39 set(KPIMTEXTEDIT_LIB_VERSION "5.3.0")
41 set(KDEPIM_LIB_VERSION "${KDEPIM_VERSION_NUMBER}")
42 set(KDEPIM_LIB_SOVERSION "5")
44 set(MESSAGELIB_LIB_VERSION_LIB "5.3.0")
45 set(PIMCOMMON_LIB_VERSION_LIB "5.3.0")
46 set(LIBKSIEVE_LIB_VERSION_LIB "5.3.0")
48 set(QT_REQUIRED_VERSION "5.6.0")
49 find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED Widgets Network Test)
52 find_package(KF5DBusAddons ${KF5_VERSION} CONFIG REQUIRED)
53 find_package(KF5DocTools ${KF5_VERSION} REQUIRED)
54 find_package(KF5Crash ${KF5_VERSION} REQUIRED)
56 # Find KdepimLibs Package
57 find_package(KF5PimTextEdit ${KPIMTEXTEDIT_LIB_VERSION} CONFIG REQUIRED)
58 find_package(KF5MailTransport ${KMAILTRANSPORT_LIB_VERSION} CONFIG REQUIRED)
60 find_package(KF5MessageViewer ${MESSAGELIB_LIB_VERSION_LIB} CONFIG REQUIRED)
61 find_package(KF5PimCommon ${PIMCOMMON_LIB_VERSION_LIB} CONFIG REQUIRED)
62 find_package(KF5LibKSieve ${LIBKSIEVE_LIB_VERSION_LIB} CONFIG REQUIRED)
64 include_directories(${sieveeditor_SOURCE_DIR} ${sieveeditor_BINARY_DIR})
65 add_definitions(-DQT_NO_URL_CAST_FROM_STRING)
68 add_definitions(-DQT_USE_QSTRINGBUILDER)
69 add_definitions( -DQT_NO_CAST_FROM_ASCII )
70 add_definitions( -DQT_NO_CAST_TO_ASCII )
74 add_subdirectory(autotests)
77 install( FILES sieveeditor.categories DESTINATION ${KDE_INSTALL_CONFDIR} )
79 if ("${CMAKE_BINARY_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
80 feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)