Changeset View
Standalone View
CMakeLists.txt
1 | cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR) | 1 | cmake_minimum_required(VERSION 2.8.11 FATAL_ERROR) | ||
---|---|---|---|---|---|
staniek: Really needed? KF5 has 2.8.12... | |||||
piggz: sfos has 2.8.11 | |||||
OK, look, I wasn't sure why the 2.8.12 was so often set as minimum (see e.g. https://techbase.kde.org/KF5/Getting_Started/Build/For_Beginners and dozens of other places on the wiki) I almost said OK but then this changelog tells me something: Especially this is used by KF5 and us:
I propose that we keep 2.8.12 in master for now. One solution is to detect SF in cmake and allow for 2.8.11 then. PS: 2.8.12 is used by Marble too, which is being ported to SF. Would you like to ask Friedrich how he dealis with the issue? See hos blog. staniek: OK, look, I wasn't sure why the 2.8.12 was so often set as minimum (see e.g. https://techbase. | |||||
piggz: friedrich changed the check to 2.8.11.2 ;) | |||||
staniek: But in master? | |||||
OK, smart one. What do you think about this advice? https://github.com/smurfy/fahrplan/issues/58#issuecomment-31149002 Just asking. staniek: OK, smart one. What do you think about this advice?
https://github. | |||||
2 | project(KProperty) | 2 | project(KProperty) | ||
3 | 3 | | |||
4 | # ECM setup | 4 | # ECM setup | ||
5 | find_package(ECM 1.8.0 REQUIRED NO_MODULE) | 5 | find_package(ECM 1.8.0 REQUIRED NO_MODULE) | ||
6 | set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR}) | 6 | set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR}) | ||
7 | 7 | | |||
8 | if(POLICY CMP0063) # Honor visibility properties for all target types (since cmake 3.3) | 8 | if(POLICY CMP0063) # Honor visibility properties for all target types (since cmake 3.3) | ||
9 | cmake_policy(SET CMP0063 OLD) | 9 | cmake_policy(SET CMP0063 OLD) | ||
Show All 10 Lines | |||||
20 | include(KDEFrameworkCompilerSettings) | 20 | include(KDEFrameworkCompilerSettings) | ||
21 | include(KDECMakeSettings) | 21 | include(KDECMakeSettings) | ||
22 | 22 | | |||
23 | include(FeatureSummary) | 23 | include(FeatureSummary) | ||
24 | include(GenerateExportHeader) | 24 | include(GenerateExportHeader) | ||
25 | include(MacroLogFeature) | 25 | include(MacroLogFeature) | ||
26 | include(KPropertyMacros) | 26 | include(KPropertyMacros) | ||
27 | 27 | | |||
28 | simple_option(KPROPERTY_WIDGET "Build the QtWidget components of KProperty" ON) | ||||
29 | | ||||
28 | set(KPROPERTY_VERSION "2.96.0") # Update this | 30 | set(KPROPERTY_VERSION "2.96.0") # Update this | ||
29 | 31 | | |||
30 | # Dependencies | 32 | # Dependencies | ||
31 | set(REQUIRED_QT_VERSION "5.2.0") | 33 | set(REQUIRED_QT_VERSION "5.2.0") | ||
32 | 34 | | |||
33 | # Required components to build this framework | 35 | # Required components to build this framework | ||
34 | find_package(Qt5 ${REQUIRED_QT_VERSION} NO_MODULE REQUIRED Core Widgets) | 36 | #find_package(Qt5Core REQUIRED) | ||
37 | #find_package(Qt5Widgets REQUIRED) | ||||
38 | | ||||
staniek: Not needed I think: it's defined by simple_option() to ON or OFF
| |||||
39 | find_package(Qt5 ${REQUIRED_QT_VERSION} NO_MODULE REQUIRED Core) | ||||
40 | | ||||
41 | if(KPROPERTY_WIDGET) | ||||
Let's use src/config-kproperty.h.cmake. Please refer to implementation of options in kdb.git/src/CMakeLists.txt and kdb.git/src/config-kdb.h.cmake as examples. staniek: Let's use src/config-kproperty.h.cmake.
Please refer to implementation of options in kdb. | |||||
42 | find_package(Qt5 ${REQUIRED_QT_VERSION} NO_MODULE REQUIRED Widgets) | ||||
35 | find_package(KF5 5.7.0 REQUIRED Config CoreAddons WidgetsAddons GuiAddons) | 43 | find_package(KF5 5.7.0 REQUIRED Config CoreAddons WidgetsAddons GuiAddons) | ||
36 | #TODO KIO | | |||
37 | 44 | | |||
staniek: Shouldn't be needed if we use the modern variant of target_link_libraries(). | |||||
45 | #TODO KIO | ||||
38 | get_git_revision_and_branch() | 46 | get_git_revision_and_branch() | ||
39 | add_tests() | 47 | add_tests() | ||
40 | add_examples() | 48 | add_examples() | ||
49 | endif() | ||||
50 | | ||||
staniek: Like above, shouldn't be needed | |||||
41 | add_unfinished_features_option() | 51 | add_unfinished_features_option() | ||
42 | add_pc_file() | 52 | add_pc_file() | ||
43 | 53 | | |||
staniek: We need this only if KPROPERTY_WIDGETS in ON, right? | |||||
54 | | ||||
44 | add_subdirectory(src) | 55 | add_subdirectory(src) | ||
45 | 56 | | |||
46 | feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES) | 57 | feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES) | ||
47 | macro_display_feature_log() | 58 | macro_display_feature_log() |
Really needed? KF5 has 2.8.12...