[fsresizer] [partition] Gracefully fail on missing dependencies
- If KPMcore is found -- it requires some other KDE Frameworks but at least in pre-4.0 versions doesn't check very well for them -- then missing its dependencies is no cause for CMake failure. Instead, log it nicely and suppress the module.
This commit is contained in:
parent
8c78a6cdfa
commit
a6db224fcb
@ -1,11 +1,11 @@
|
|||||||
find_package( KPMcore 3.3 )
|
find_package( KPMcore 3.3 )
|
||||||
|
find_package( KF5Config CONFIG )
|
||||||
|
find_package( KF5I18n CONFIG )
|
||||||
|
find_package( KF5WidgetsAddons CONFIG )
|
||||||
|
|
||||||
set( _partition_defs "" )
|
set( _partition_defs "" )
|
||||||
|
|
||||||
if ( KPMcore_FOUND )
|
if ( KPMcore_FOUND AND Qt5DBus_FOUND AND KF5CoreAddons_FOUND AND KF5Config_FOUND )
|
||||||
find_package( Qt5 REQUIRED DBus ) # Needed for KPMCore
|
|
||||||
find_package( KF5 REQUIRED I18n WidgetsAddons ) # Needed for KPMCore
|
|
||||||
|
|
||||||
include_directories( ${KPMCORE_INCLUDE_DIR} ${CMAKE_SOURCE_DIR}/src/modules/partition )
|
include_directories( ${KPMCORE_INCLUDE_DIR} ${CMAKE_SOURCE_DIR}/src/modules/partition )
|
||||||
|
|
||||||
if ( KPMcore_VERSION VERSION_GREATER "3.3.0")
|
if ( KPMcore_VERSION VERSION_GREATER "3.3.0")
|
||||||
@ -48,5 +48,9 @@ if ( KPMcore_FOUND )
|
|||||||
target_compile_definitions( fsresizertest PRIVATE ${_partition_defs} )
|
target_compile_definitions( fsresizertest PRIVATE ${_partition_defs} )
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
|
if ( NOT KPMcore_FOUND )
|
||||||
calamares_skip_module( "fsresizer (missing suitable KPMcore)" )
|
calamares_skip_module( "fsresizer (missing suitable KPMcore)" )
|
||||||
|
else()
|
||||||
|
calamares_skip_module( "fsresizer (missing dependencies for KPMcore)" )
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
@ -22,11 +22,11 @@ set_package_properties(
|
|||||||
KPMcore PROPERTIES
|
KPMcore PROPERTIES
|
||||||
PURPOSE "For partitioning module"
|
PURPOSE "For partitioning module"
|
||||||
)
|
)
|
||||||
|
find_package( KF5Config CONFIG )
|
||||||
|
find_package( KF5I18n CONFIG )
|
||||||
|
find_package( KF5WidgetsAddons CONFIG )
|
||||||
|
|
||||||
if ( KPMcore_FOUND )
|
if ( KPMcore_FOUND AND Qt5DBus_FOUND AND KF5CoreAddons_FOUND AND KF5Config_FOUND )
|
||||||
find_package( Qt5 REQUIRED DBus )
|
|
||||||
find_package( KF5 REQUIRED Config CoreAddons I18n WidgetsAddons )
|
|
||||||
|
|
||||||
if ( KPMcore_VERSION VERSION_GREATER "3.3.0")
|
if ( KPMcore_VERSION VERSION_GREATER "3.3.0")
|
||||||
list( APPEND _partition_defs WITH_KPMCORE331API) # kpmcore > 3.3.0 with deprecations
|
list( APPEND _partition_defs WITH_KPMCORE331API) # kpmcore > 3.3.0 with deprecations
|
||||||
endif()
|
endif()
|
||||||
@ -106,5 +106,9 @@ if ( KPMcore_FOUND )
|
|||||||
SHARED_LIB
|
SHARED_LIB
|
||||||
)
|
)
|
||||||
else()
|
else()
|
||||||
|
if ( NOT KPMcore_FOUND )
|
||||||
calamares_skip_module( "partition (missing suitable KPMcore)" )
|
calamares_skip_module( "partition (missing suitable KPMcore)" )
|
||||||
|
else()
|
||||||
|
calamares_skip_module( "partition (missing dependencies for KPMcore)" )
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
Loading…
Reference in New Issue
Block a user