Make it compiles when deprecated method are disabled. Add more find package
[kdepim.git] / importwizard / CMakeLists.txt
blob841c3df99ddd8af0cfc384cad03f82e10b3c271e
1 project(importwizard)
3 if(${CMAKE_SOURCE_DIR} STREQUAL ${importwizard_SOURCE_DIR})
4     cmake_minimum_required(VERSION 3.1)
5     set(KF5_VERSION "5.25.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 pre)
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.42")
38     set(KDEPIM_VERSION "${KDEPIM_VERSION_NUMBER}${KDEPIM_DEV_VERSION}")
41     set(KMAILTRANSPORT_LIB_VERSION "5.3.40")
42     set(AKONADI_VERSION "5.3.43")
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.40")
50     set(MAILCOMMON_LIB_VERSION_LIB "5.3.42")
51     set(MESSAGELIB_LIB_VERSION_LIB "5.3.47")
52     set(PIMCOMMON_LIB_VERSION_LIB "5.3.41")
53     set(LIBKDEPIM_LIB_VERSION_LIB "5.3.42")
54     set(IDENTITYMANAGEMENT_LIB_VERSION "5.3.41")
55     set(KCONTACTS_LIB_VERSION "5.3.43")
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)
64     find_package(KF5KIO ${KF5_VERSION} REQUIRED)
66     # Find KdepimLibs Package
67     find_package(KF5Akonadi ${AKONADI_VERSION} CONFIG REQUIRED)
68     find_package(KF5Contacts ${KCONTACTS_LIB_VERSION} CONFIG REQUIRED)
69     find_package(KF5IdentityManagement ${IDENTITYMANAGEMENT_LIB_VERSION} CONFIG REQUIRED)
70     find_package(KF5MailTransport ${KMAILTRANSPORT_LIB_VERSION} CONFIG REQUIRED)
73     find_package(KF5MailCommon ${MAILCOMMON_LIB_VERSION_LIB} CONFIG REQUIRED)
74     find_package(KF5MailImporter ${LIBMAILIMPORTER_VERSION_LIB} CONFIG REQUIRED)
75     find_package(KF5MessageViewer ${MESSAGELIB_LIB_VERSION_LIB} CONFIG REQUIRED)
76     find_package(KF5PimCommon ${PIMCOMMON_LIB_VERSION_LIB} CONFIG REQUIRED)
77     find_package(KF5Libkdepim ${LIBKDEPIM_LIB_VERSION_LIB} CONFIG REQUIRED)
78     find_package(KF5MessageComposer ${MESSAGELIB_LIB_VERSION_LIB} CONFIG REQUIRED)
79     include_directories(${importwizard_SOURCE_DIR} ${importwizard_BINARY_DIR})
80 endif()
82 add_definitions(-DQT_NO_URL_CAST_FROM_STRING)
83 add_definitions(-DQT_USE_QSTRINGBUILDER)
84 include_directories(
85     ${importwizard_SOURCE_DIR}/src/autodetect/
86     )
88 add_subdirectory(src)
90 install( FILES importwizard.categories DESTINATION ${KDE_INSTALL_CONFDIR} )
92 if ("${CMAKE_BINARY_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
93     feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
94 endif()