Changeset View
Changeset View
Standalone View
Standalone View
CMakeLists.txt
Show All 30 Lines | |||||
31 | ######################### General Requirements ########################## | 31 | ######################### General Requirements ########################## | ||
32 | 32 | | |||
33 | find_package(ECM 0.0.11 REQUIRED NO_MODULE) | 33 | find_package(ECM 0.0.11 REQUIRED NO_MODULE) | ||
34 | set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules) | 34 | set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules) | ||
35 | 35 | | |||
36 | include(KDEInstallDirs) | 36 | include(KDEInstallDirs) | ||
37 | include(KDECMakeSettings) | 37 | include(KDECMakeSettings) | ||
38 | include(FeatureSummary) | 38 | include(FeatureSummary) | ||
39 | include(CMakeDependentOption) | ||||
39 | 40 | | |||
40 | include(GenerateExportHeader) | 41 | include(GenerateExportHeader) | ||
41 | include(KMyMoneyMacros) | 42 | include(KMyMoneyMacros) | ||
42 | 43 | | |||
43 | set(GPG_ENCRYPTION "no") | 44 | set(GPG_ENCRYPTION "no") | ||
44 | set (OPT_KF5_COMPONENTS DocTools Holidays Contacts Akonadi IdentityManagement Activities Kross) | 45 | set (OPT_KF5_COMPONENTS DocTools Holidays Contacts Akonadi IdentityManagement Activities) | ||
45 | find_package(Gpgmepp) | 46 | find_package(Gpgmepp) | ||
46 | if (Gpgmepp_FOUND) | 47 | if (Gpgmepp_FOUND) | ||
47 | set(GPG_ENCRYPTION "yes") | 48 | set(GPG_ENCRYPTION "yes") | ||
48 | else() | 49 | else() | ||
49 | set(OPT_KF5_COMPONENTS ${OPT_KF5_COMPONENTS} Gpgmepp) | 50 | set(OPT_KF5_COMPONENTS ${OPT_KF5_COMPONENTS} Gpgmepp) | ||
50 | endif() | 51 | endif() | ||
51 | 52 | | |||
52 | find_package(Qt5 5.6 REQUIRED COMPONENTS Core DBus Widgets Svg Sql Xml Test PrintSupport) | 53 | find_package(Qt5 5.6 REQUIRED | ||
54 | COMPONENTS Core DBus Widgets Svg Sql Xml Test PrintSupport | ||||
55 | OPTIONAL_COMPONENTS Concurrent) | ||||
53 | 56 | | |||
54 | find_package(KF5 5.2 REQUIRED | 57 | find_package(KF5 5.2 REQUIRED | ||
55 | COMPONENTS Archive CoreAddons Config ConfigWidgets I18n Completion KCMUtils ItemModels ItemViews Service Wallet IconThemes XmlGui TextWidgets Notifications KIO | 58 | COMPONENTS Archive CoreAddons Config ConfigWidgets I18n Completion KCMUtils ItemModels ItemViews Service Wallet IconThemes XmlGui TextWidgets Notifications KIO | ||
56 | OPTIONAL_COMPONENTS ${OPT_KF5_COMPONENTS} | 59 | OPTIONAL_COMPONENTS ${OPT_KF5_COMPONENTS} | ||
57 | ) | 60 | ) | ||
58 | find_package(LibAlkimia5 7.0.0 REQUIRED) | 61 | find_package(LibAlkimia5 7.0.0 REQUIRED) | ||
59 | 62 | | |||
60 | if(CMAKE_SYSTEM_NAME MATCHES "Windows") | 63 | if(CMAKE_SYSTEM_NAME MATCHES "Windows") | ||
▲ Show 20 Lines • Show All 104 Lines • ▼ Show 20 Line(s) | 166 | if(ENABLE_KBANKING) | |||
165 | 168 | | |||
166 | find_package(AQBANKING 5.6.5) | 169 | find_package(AQBANKING 5.6.5) | ||
167 | find_package(gwenhywfar 4.15.3) | 170 | find_package(gwenhywfar 4.15.3) | ||
168 | find_package(gwengui-cpp) | 171 | find_package(gwengui-cpp) | ||
169 | find_package(gwengui-qt5) | 172 | find_package(gwengui-qt5) | ||
170 | if (AQBANKING_FOUND AND gwengui-cpp_FOUND AND gwengui-qt5_FOUND AND Qt5QuickWidgets_FOUND) | 173 | if (AQBANKING_FOUND AND gwengui-cpp_FOUND AND gwengui-qt5_FOUND AND Qt5QuickWidgets_FOUND) | ||
171 | set(KBANKING_FOUND ON) | 174 | set(KBANKING_FOUND ON) | ||
172 | else() | 175 | else() | ||
173 | if(NOT KBANKING_FOUND STREQUAL "AUTO") | 176 | if(NOT KBANKING_FOUND STREQUAL "AUTO") | ||
174 | message(FATAL_ERROR "KBanking requirements not met") | 177 | message(FATAL_ERROR "KBanking requirements not met") | ||
pino: Looking at build time for a Python module used at runtime does not make much sense to me. This… | |||||
175 | endif(NOT KBANKING_FOUND STREQUAL "AUTO") | 178 | endif(NOT KBANKING_FOUND STREQUAL "AUTO") | ||
176 | set(KBANKING_FOUND OFF) | 179 | set(KBANKING_FOUND OFF) | ||
177 | set(ENABLE_KBANKING OFF CACHE BOOL "Enable KBanking plugin" FORCE) | 180 | set(ENABLE_KBANKING OFF CACHE BOOL "Enable KBanking plugin" FORCE) | ||
178 | endif () | 181 | endif () | ||
179 | endif(ENABLE_KBANKING) | 182 | endif(ENABLE_KBANKING) | ||
180 | 183 | | |||
181 | # check for optional Weboob support | 184 | set(Python_ADDITIONAL_VERSIONS 2.7 2.6) | ||
182 | set(WEBOOB_FOUND "AUTO") | 185 | find_package(PythonInterp 2.6) | ||
183 | mark_as_advanced(WEBOOB_FOUND) | 186 | find_package(PythonLibs ${PYTHON_VERSION_STRING}) | ||
184 | if(DEFINED ENABLE_WEBOOB) | 187 | | ||
185 | set(WEBOOB_FOUND OFF) | 188 | if(PYTHONINTERP_FOUND AND PYTHONLIBS_FOUND) | ||
186 | endif(DEFINED ENABLE_WEBOOB) | 189 | if(PYTHON_VERSION_MAJOR GREATER_EQUAL 3) | ||
187 | option(ENABLE_WEBOOB "Enable weboob plugin" ON) | 190 | unset(PYTHONLIBS_FOUND) | ||
188 | if(ENABLE_WEBOOB) | 191 | unset(PYTHONINTERP_FOUND) | ||
189 | if(KF5Kross_FOUND) | 192 | message(WARNING "Python 2 required, but Python 3 found.") | ||
190 | set(WEBOOB_FOUND ON) | 193 | else() | ||
191 | else(KF5Kross_FOUND) | 194 | include(FindPythonModule) | ||
192 | if(NOT WEBOOB_FOUND STREQUAL "AUTO") | 195 | find_python_module(weboob REQUIRED) | ||
193 | message(FATAL_ERROR "Weboob requirements not met") | 196 | endif() | ||
194 | endif(NOT WEBOOB_FOUND STREQUAL "AUTO") | 197 | endif() | ||
195 | set(WEBOOB_FOUND OFF) | 198 | | ||
196 | set(ENABLE_WEBOOB OFF CACHE BOOL "Enable weboob plugin" FORCE) | 199 | CMAKE_DEPENDENT_OPTION(ENABLE_WEBOOB "Enable Weboob plugin" ON | ||
197 | endif(KF5Kross_FOUND) | 200 | "PYTHONLIBS_FOUND;PYTHONINTERP_FOUND;PY_WEBOOB;Qt5Concurrent_FOUND" OFF) | ||
198 | endif(ENABLE_WEBOOB) | | |||
199 | 201 | | |||
200 | # check for optional ical support | 202 | # check for optional ical support | ||
201 | set(LIBICAL_DEFAULT "AUTO") | 203 | set(LIBICAL_DEFAULT "AUTO") | ||
202 | if(DEFINED ENABLE_LIBICAL) | 204 | if(DEFINED ENABLE_LIBICAL) | ||
203 | set(LIBICAL_DEFAULT ${ENABLE_LIBICAL}) | 205 | set(LIBICAL_DEFAULT ${ENABLE_LIBICAL}) | ||
204 | endif(DEFINED ENABLE_LIBICAL) | 206 | endif(DEFINED ENABLE_LIBICAL) | ||
205 | option(ENABLE_LIBICAL "Enable Calendar plugin" ON) | 207 | option(ENABLE_LIBICAL "Enable Calendar plugin" ON) | ||
206 | if(ENABLE_LIBICAL) | 208 | if(ENABLE_LIBICAL) | ||
▲ Show 20 Lines • Show All 156 Lines • Show Last 20 Lines |
Looking at build time for a Python module used at runtime does not make much sense to me. This rather ought to be some kind of runtime check when loading the weboob plugin.