diff --git a/src/modules/fsresizer/CMakeLists.txt b/src/modules/fsresizer/CMakeLists.txt index 582a02627..36c8c764c 100644 --- a/src/modules/fsresizer/CMakeLists.txt +++ b/src/modules/fsresizer/CMakeLists.txt @@ -44,7 +44,8 @@ if ( KPMcore_FOUND ) Qt5::Test ) set_target_properties( fsresizertest PROPERTIES AUTOMOC TRUE ) - target_include_directories(fsresizertest PRIVATE /usr/local/include ) + target_include_directories( fsresizertest PRIVATE /usr/local/include ) + target_compile_definitions( fsresizertest PRIVATE ${_partition_defs} ) endif() else() calamares_skip_module( "fsresizer (missing suitable KPMcore)" ) diff --git a/src/modules/fsresizer/ResizeFSJob.cpp b/src/modules/fsresizer/ResizeFSJob.cpp index d2cfaf6ed..61fbc6898 100644 --- a/src/modules/fsresizer/ResizeFSJob.cpp +++ b/src/modules/fsresizer/ResizeFSJob.cpp @@ -120,7 +120,7 @@ ResizeFSJob::PartitionMatch ResizeFSJob::findPartition( CoreBackend* backend ) { using DeviceList = QList< Device* >; -#ifdef WITH_KPMCORE4API +#ifdef WITH_KPMCORE331API DeviceList devices = backend->scanDevices( /* not includeReadOnly, not includeLoopback */ ScanFlag(0) ); #else DeviceList devices = backend->scanDevices( /* excludeReadOnly */ true ); diff --git a/src/modules/partition/core/DeviceList.cpp b/src/modules/partition/core/DeviceList.cpp index b65473cf6..a7f9ff44c 100644 --- a/src/modules/partition/core/DeviceList.cpp +++ b/src/modules/partition/core/DeviceList.cpp @@ -107,7 +107,7 @@ QList< Device* > getDevices( DeviceType which, qint64 minimumSize ) bool writableOnly = (which == DeviceType::WritableOnly); CoreBackend* backend = CoreBackendManager::self()->backend(); -#ifdef WITH_KPMCORE4API +#ifdef WITH_KPMCORE331API DeviceList devices = backend->scanDevices( /* not includeReadOnly, not includeLoopback */ ScanFlag(0) ); #else DeviceList devices = backend->scanDevices( /* excludeReadOnly */ true ); diff --git a/src/modules/partition/tests/CMakeLists.txt b/src/modules/partition/tests/CMakeLists.txt index 7b40c34a5..ac3968df9 100644 --- a/src/modules/partition/tests/CMakeLists.txt +++ b/src/modules/partition/tests/CMakeLists.txt @@ -32,4 +32,5 @@ if( ECM_FOUND AND BUILD_TESTING ) ) set_target_properties( partitionjobtests PROPERTIES AUTOMOC TRUE ) + target_compile_definitions( partitionjobtests PRIVATE ${_partition_defs} ) endif()