2019-03-17 15:21:57 +01:00
|
|
|
# When debugging the partitioning widget, or experimenting, you may
|
|
|
|
# want to allow unsafe partitioning choices (e.g. doing things to the
|
|
|
|
# current disk). Set DEBUG_PARTITION_UNSAFE to allow that (it turns off
|
|
|
|
# some filtering of devices).
|
|
|
|
option( DEBUG_PARTITION_UNSAFE "Allow unsafe partitioning choices." OFF )
|
|
|
|
option( DEBUG_PARTITION_LAME "Unsafe partitioning will error out on exec." ON )
|
|
|
|
|
2019-08-08 18:42:47 +02:00
|
|
|
include_directories( ${CMAKE_SOURCE_DIR} ) # For 3rdparty
|
|
|
|
|
2019-03-17 15:21:57 +01:00
|
|
|
set( _partition_defs )
|
|
|
|
if( DEBUG_PARTITION_UNSAFE )
|
|
|
|
if( DEBUG_PARTITION_LAME )
|
|
|
|
list( APPEND _partition_defs DEBUG_PARTITION_LAME )
|
|
|
|
endif()
|
|
|
|
list( APPEND _partition_defs DEBUG_PARTITION_UNSAFE )
|
|
|
|
endif()
|
|
|
|
|
2017-10-31 13:25:57 +01:00
|
|
|
find_package(ECM ${ECM_VERSION} REQUIRED NO_MODULE)
|
2014-07-05 23:28:13 +02:00
|
|
|
|
2018-01-10 15:05:15 +01:00
|
|
|
find_package( KPMcore 3.3 )
|
|
|
|
set_package_properties(
|
|
|
|
KPMcore PROPERTIES
|
2019-06-14 23:57:07 +02:00
|
|
|
PURPOSE "For partition module"
|
2018-01-10 15:05:15 +01:00
|
|
|
)
|
2019-08-08 13:32:20 +02:00
|
|
|
find_package( KF5Config CONFIG )
|
|
|
|
find_package( KF5I18n CONFIG )
|
|
|
|
find_package( KF5WidgetsAddons CONFIG )
|
2014-06-27 17:25:39 +02:00
|
|
|
|
2019-08-08 13:32:20 +02:00
|
|
|
if ( KPMcore_FOUND AND Qt5DBus_FOUND AND KF5CoreAddons_FOUND AND KF5Config_FOUND )
|
2019-04-12 12:44:59 +02:00
|
|
|
if ( KPMcore_VERSION VERSION_GREATER "3.3.0")
|
|
|
|
list( APPEND _partition_defs WITH_KPMCORE331API) # kpmcore > 3.3.0 with deprecations
|
|
|
|
endif()
|
2019-04-12 11:18:29 +02:00
|
|
|
if ( KPMcore_VERSION VERSION_GREATER "3.90")
|
|
|
|
list( APPEND _partition_defs WITH_KPMCORE4API) # kpmcore 4 with new API
|
2018-06-14 20:37:00 +02:00
|
|
|
endif()
|
2020-03-16 22:25:55 +01:00
|
|
|
if( KPMcore_VERSION VERSION_GREATER_EQUAL "4.2" )
|
|
|
|
list( APPEND _partition_defs WITH_KPMCORE42API) # kpmcore 4.2 with new API
|
|
|
|
endif()
|
2018-06-14 20:37:00 +02:00
|
|
|
|
2018-01-10 15:05:15 +01:00
|
|
|
include_directories( ${KPMCORE_INCLUDE_DIR} )
|
|
|
|
include_directories( ${PROJECT_BINARY_DIR}/src/libcalamaresui )
|
2017-06-20 13:10:29 +02:00
|
|
|
|
2018-01-10 15:05:15 +01:00
|
|
|
add_subdirectory( tests )
|
2014-09-03 18:09:37 +02:00
|
|
|
|
2018-01-10 15:05:15 +01:00
|
|
|
calamares_add_plugin( partition
|
|
|
|
TYPE viewmodule
|
|
|
|
EXPORT_MACRO PLUGINDLLEXPORT_PRO
|
|
|
|
SOURCES
|
|
|
|
core/BootLoaderModel.cpp
|
|
|
|
core/ColorUtils.cpp
|
|
|
|
core/DeviceList.cpp
|
|
|
|
core/DeviceModel.cpp
|
|
|
|
core/KPMHelpers.cpp
|
|
|
|
core/PartitionActions.cpp
|
|
|
|
core/PartitionCoreModule.cpp
|
|
|
|
core/PartitionInfo.cpp
|
2019-01-07 17:25:22 +01:00
|
|
|
core/PartitionLayout.cpp
|
2018-01-10 15:05:15 +01:00
|
|
|
core/PartitionModel.cpp
|
|
|
|
core/PartUtils.cpp
|
|
|
|
gui/BootInfoWidget.cpp
|
|
|
|
gui/ChoicePage.cpp
|
|
|
|
gui/CreatePartitionDialog.cpp
|
2018-06-07 22:22:22 +02:00
|
|
|
gui/CreateVolumeGroupDialog.cpp
|
2018-01-10 15:05:15 +01:00
|
|
|
gui/DeviceInfoWidget.cpp
|
|
|
|
gui/EditExistingPartitionDialog.cpp
|
|
|
|
gui/EncryptWidget.cpp
|
2018-06-04 21:31:58 +02:00
|
|
|
gui/ListPhysicalVolumeWidgetItem.cpp
|
2018-01-10 15:05:15 +01:00
|
|
|
gui/PartitionPage.cpp
|
|
|
|
gui/PartitionBarsView.cpp
|
2018-05-16 14:34:33 +02:00
|
|
|
gui/PartitionDialogHelpers.cpp
|
2018-01-10 15:05:15 +01:00
|
|
|
gui/PartitionLabelsView.cpp
|
|
|
|
gui/PartitionSizeController.cpp
|
|
|
|
gui/PartitionSplitterWidget.cpp
|
|
|
|
gui/PartitionViewStep.cpp
|
|
|
|
gui/PrettyRadioButton.cpp
|
2018-06-26 05:38:52 +02:00
|
|
|
gui/ResizeVolumeGroupDialog.cpp
|
2018-01-10 15:05:15 +01:00
|
|
|
gui/ScanningDialog.cpp
|
|
|
|
gui/ReplaceWidget.cpp
|
2018-06-04 21:31:58 +02:00
|
|
|
gui/VolumeGroupBaseDialog.cpp
|
2018-01-10 15:05:15 +01:00
|
|
|
jobs/ClearMountsJob.cpp
|
|
|
|
jobs/ClearTempMountsJob.cpp
|
|
|
|
jobs/CreatePartitionJob.cpp
|
|
|
|
jobs/CreatePartitionTableJob.cpp
|
2018-06-04 21:31:58 +02:00
|
|
|
jobs/CreateVolumeGroupJob.cpp
|
2018-06-26 05:38:52 +02:00
|
|
|
jobs/DeactivateVolumeGroupJob.cpp
|
2018-01-10 15:05:15 +01:00
|
|
|
jobs/DeletePartitionJob.cpp
|
|
|
|
jobs/FillGlobalStorageJob.cpp
|
|
|
|
jobs/FormatPartitionJob.cpp
|
|
|
|
jobs/PartitionJob.cpp
|
2018-06-26 05:38:52 +02:00
|
|
|
jobs/RemoveVolumeGroupJob.cpp
|
2018-01-10 15:05:15 +01:00
|
|
|
jobs/ResizePartitionJob.cpp
|
2018-06-26 05:38:52 +02:00
|
|
|
jobs/ResizeVolumeGroupJob.cpp
|
2018-01-10 15:05:15 +01:00
|
|
|
jobs/SetPartitionFlagsJob.cpp
|
|
|
|
UI
|
|
|
|
gui/ChoicePage.ui
|
|
|
|
gui/CreatePartitionDialog.ui
|
|
|
|
gui/CreatePartitionTableDialog.ui
|
|
|
|
gui/EditExistingPartitionDialog.ui
|
|
|
|
gui/EncryptWidget.ui
|
|
|
|
gui/PartitionPage.ui
|
|
|
|
gui/ReplaceWidget.ui
|
2018-06-04 21:31:58 +02:00
|
|
|
gui/VolumeGroupBaseDialog.ui
|
2018-01-10 15:05:15 +01:00
|
|
|
LINK_PRIVATE_LIBRARIES
|
|
|
|
kpmcore
|
|
|
|
calamaresui
|
|
|
|
KF5::CoreAddons
|
2019-03-17 15:21:57 +01:00
|
|
|
COMPILE_DEFINITIONS ${_partition_defs}
|
2018-01-10 15:05:15 +01:00
|
|
|
SHARED_LIB
|
|
|
|
)
|
|
|
|
else()
|
2019-08-08 13:32:20 +02:00
|
|
|
if ( NOT KPMcore_FOUND )
|
|
|
|
calamares_skip_module( "partition (missing suitable KPMcore)" )
|
|
|
|
else()
|
|
|
|
calamares_skip_module( "partition (missing dependencies for KPMcore)" )
|
|
|
|
endif()
|
2018-01-10 15:05:15 +01:00
|
|
|
endif()
|