mirror of
https://github.com/parchlinux/calamares.git
synced 2025-03-01 05:15:44 -05:00
CMake: Handle KPMCore version better
- provide complete information for feature_summary - set the right API version when building libcalamares - report the beta version number when it's wrong
This commit is contained in:
parent
f6373561d3
commit
8e4a2b3543
3 changed files with 14 additions and 5 deletions
|
@ -103,6 +103,9 @@ endif()
|
|||
find_package( KPMcore 3.3 )
|
||||
set_package_properties(
|
||||
KPMcore PROPERTIES
|
||||
URL "https://invent.kde.org/kde/kpmcore"
|
||||
DESCRIPTION "KDE Partitioning library"
|
||||
TYPE RECOMMENDED
|
||||
PURPOSE "For partitioning service"
|
||||
)
|
||||
|
||||
|
@ -110,8 +113,10 @@ if ( KPMcore_FOUND )
|
|||
find_package( Qt5 REQUIRED DBus ) # Needed for KPMCore
|
||||
find_package( KF5 REQUIRED I18n WidgetsAddons ) # Needed for KPMCore
|
||||
|
||||
if( KPMcore_VERSION VERSION_GREATER "3.3.70" AND KPMcore_VERSION VERSION_LESS "4.0" )
|
||||
message( FATAL_ERROR "KPMCore beta versions are not supported" )
|
||||
if( KPMcore_VERSION VERSION_GREATER_EQUAL "4.0" )
|
||||
add_definitions( -DWITH_KPMCORE4API ) # kpmcore 4 with new API
|
||||
elseif( KPMcore_VERSION VERSION_GREATER "3.3.70" )
|
||||
message( FATAL_ERROR "KPMCore beta versions ${KPMcore_VERSION} not supported" )
|
||||
endif()
|
||||
|
||||
include_directories( ${KPMCORE_INCLUDE_DIR} )
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
find_package( KPMcore 3.3 )
|
||||
set_package_properties(
|
||||
KPMcore PROPERTIES
|
||||
PURPOSE "For fsresizer module"
|
||||
)
|
||||
|
||||
set( _partition_defs "" )
|
||||
|
||||
|
@ -11,7 +15,7 @@ if ( KPMcore_FOUND )
|
|||
if( KPMcore_VERSION VERSION_GREATER_EQUAL "4.0" )
|
||||
list( APPEND _partition_defs WITH_KPMCORE4API ) # kpmcore 4 with new API
|
||||
elseif( KPMcore_VERSION VERSION_GREATER "3.3.70" )
|
||||
message( FATAL_ERROR "KPMCore beta versions are not supported" )
|
||||
message( FATAL_ERROR "KPMCore beta versions ${KPMcore_VERSION} are not supported" )
|
||||
endif()
|
||||
|
||||
# The PartitionIterator is a small class, and it's easiest -- but also a
|
||||
|
|
|
@ -18,7 +18,7 @@ find_package(ECM ${ECM_VERSION} REQUIRED NO_MODULE)
|
|||
find_package( KPMcore 3.3 )
|
||||
set_package_properties(
|
||||
KPMcore PROPERTIES
|
||||
PURPOSE "For partitioning module"
|
||||
PURPOSE "For partition module"
|
||||
)
|
||||
|
||||
if ( KPMcore_FOUND )
|
||||
|
@ -28,7 +28,7 @@ if ( KPMcore_FOUND )
|
|||
if( KPMcore_VERSION VERSION_GREATER_EQUAL "4.0" )
|
||||
list( APPEND _partition_defs WITH_KPMCORE4API ) # kpmcore 4 with new API
|
||||
elseif( KPMcore_VERSION VERSION_GREATER "3.3.70" )
|
||||
message( FATAL_ERROR "KPMCore beta versions are not supported" )
|
||||
message( FATAL_ERROR "KPMCore beta versions ${KPMcore_VERSION} are not supported" )
|
||||
endif()
|
||||
|
||||
include_directories( ${KPMCORE_INCLUDE_DIR} )
|
||||
|
|
Loading…
Add table
Reference in a new issue