[partition] [fsresizer] Adjust to post-3.3.0 API

- KDE neon ships a post-3.3.0 KPMCore, with deprecations, but not yet
   the KPMCore 4 API, so add another API-version check to handle the
   deprecations. Keeps warnings down.
This commit is contained in:
Adriaan de Groot 2019-04-12 12:44:59 +02:00
parent c0710cabe4
commit 4e24ea29e2
3 changed files with 7 additions and 1 deletions

View File

@ -8,6 +8,9 @@ if ( KPMcore_FOUND )
include_directories( ${KPMCORE_INCLUDE_DIR} )
include_directories( ${PROJECT_BINARY_DIR}/src/libcalamares )
if ( KPMcore_VERSION VERSION_GREATER "3.3.0")
list( APPEND _partition_defs WITH_KPMCORE331API) # kpmcore > 3.3.0 with deprecations
endif()
if ( KPMcore_VERSION VERSION_GREATER "3.90")
list( APPEND _partition_defs WITH_KPMCORE4API) # kpmcore 4 with new API
endif()

View File

@ -27,6 +27,9 @@ set_package_properties(
)
if ( KPMcore_FOUND )
if ( KPMcore_VERSION VERSION_GREATER "3.3.0")
list( APPEND _partition_defs WITH_KPMCORE331API) # kpmcore > 3.3.0 with deprecations
endif()
if ( KPMcore_VERSION VERSION_GREATER "3.90")
list( APPEND _partition_defs WITH_KPMCORE4API) # kpmcore 4 with new API
endif()

View File

@ -33,7 +33,7 @@ class Partition;
class PartitionNode;
class PartitionRole;
#ifdef WITH_KPMCORE4API
#ifdef WITH_KPMCORE331API
#define KPM_PARTITION_FLAG(x) PartitionTable::Flag::x
#define KPM_PARTITION_STATE(x) Partition::State::x
#define KPM_PARTITION_FLAG_ESP PartitionTable::Flag::Boot