SVN_SILENT made messages (.desktop file) - always resolve ours
[kdepim.git] / importwizard / CMakeLists.txt
blob292cee4a41d70330640797d3356e9dbd97998a21
1 project(importwizard)
3 if(${CMAKE_SOURCE_DIR} STREQUAL ${importwizard_SOURCE_DIR})
4     cmake_minimum_required(VERSION 3.1)
5     set(KF5_VERSION "5.23.0")
6     find_package(ECM ${KF5_VERSION} REQUIRED NO_MODULE)
7     set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
8     include(ECMInstallIcons)
10     include(ECMOptionalAddSubdirectory)
11     include(ECMSetupVersion)
12     include(ECMAddTests)
13     include(ECMMarkNonGuiExecutable)
14     include(GenerateExportHeader)
15     include(ECMGenerateHeaders)
16     include(CMakePackageConfigHelpers)
17     include(FeatureSummary)
18     include(CheckFunctionExists)
19     include(ECMGeneratePriFile)
21     include(KDEInstallDirs)
22     include(KDECMakeSettings)
23     include(KDECompilerSettings NO_POLICY_SCOPE)
24     include(ECMAddAppIcon)
25     include(ECMQtDeclareLoggingCategory)
27     # Do NOT add quote
28     set(KDEPIM_DEV_VERSION )
30     # add an extra space
31     if(DEFINED KDEPIM_DEV_VERSION)
32         set(KDEPIM_DEV_VERSION " ${KDEPIM_DEV_VERSION}")
33     endif()
37     set(KDEPIM_VERSION_NUMBER "5.3.0")
38     set(KDEPIM_VERSION "${KDEPIM_VERSION_NUMBER}${KDEPIM_DEV_VERSION}")
41     set(KMAILTRANSPORT_LIB_VERSION "5.3.0")
42     set(AKONADI_VERSION "5.3.0")
44     set(KDEPIM_LIB_VERSION "${KDEPIM_VERSION_NUMBER}")
45     set(KDEPIM_LIB_SOVERSION "5")
47     set(QT_REQUIRED_VERSION "5.6.0")
48     find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED Widgets Gui)
49     set(LIBMAILIMPORTER_VERSION_LIB "5.3.0")
50     set(MAILCOMMON_LIB_VERSION_LIB "5.3.0")
51     set(MESSAGELIB_LIB_VERSION_LIB "5.3.0")
52     set(PIMCOMMON_LIB_VERSION_LIB "5.3.0")
53     set(LIBKDEPIM_LIB_VERSION_LIB "5.3.0")
54     set(IDENTITYMANAGEMENT_LIB_VERSION "5.3.0")
55     set(KCONTACTS_LIB_VERSION "5.3.0")
57     # Find KF5 package
58     find_package(KF5Wallet ${KF5_VERSION} CONFIG REQUIRED)
59     find_package(KF5Config ${KF5_VERSION} CONFIG REQUIRED)
60     find_package(KF5DBusAddons ${KF5_VERSION} CONFIG REQUIRED)
61     find_package(KF5Auth ${KF5_VERSION} CONFIG REQUIRED)
62     find_package(KF5DocTools ${KF5_VERSION} REQUIRED)
63     find_package(KF5Crash ${KF5_VERSION} REQUIRED)
65     # Find KdepimLibs Package
66     find_package(KF5Akonadi ${AKONADI_VERSION} CONFIG REQUIRED)
67     find_package(KF5Contacts ${KCONTACTS_LIB_VERSION} CONFIG REQUIRED)
68     find_package(KF5IdentityManagement ${IDENTITYMANAGEMENT_LIB_VERSION} CONFIG REQUIRED)
69     find_package(KF5MailTransport ${KMAILTRANSPORT_LIB_VERSION} CONFIG REQUIRED)
72     find_package(KF5MailCommon ${MAILCOMMON_LIB_VERSION_LIB} CONFIG REQUIRED)
73     find_package(KF5MailImporter ${LIBMAILIMPORTER_VERSION_LIB} CONFIG REQUIRED)
74     find_package(KF5MessageViewer ${MESSAGELIB_LIB_VERSION_LIB} CONFIG REQUIRED)
75     find_package(KF5PimCommon ${PIMCOMMON_LIB_VERSION_LIB} CONFIG REQUIRED)
76     find_package(KF5Libkdepim ${LIBKDEPIM_LIB_VERSION_LIB} CONFIG REQUIRED)
77     find_package(KF5MessageComposer ${MESSAGELIB_LIB_VERSION_LIB} CONFIG REQUIRED)
78     include_directories(${importwizard_SOURCE_DIR} ${importwizard_BINARY_DIR})
79     add_definitions(-DQT_NO_URL_CAST_FROM_STRING)
80 endif()
82 add_definitions(-DQT_USE_QSTRINGBUILDER)
83 include_directories(
84     ${importwizard_SOURCE_DIR}/src/autodetect/
85     )
87 add_subdirectory(src)
89 install( FILES importwizard.categories DESTINATION ${KDE_INSTALL_CONFDIR} )
91 if ("${CMAKE_BINARY_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
92     feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
93 endif()