CMake: massage dependency-finding
- If KPMCore is not found, don't require the KF5 components that it would depend on. - If ECM is found, use KDEInstallDirs always, not just when the partitioning module is used.
This commit is contained in:
parent
2620829515
commit
a01262a535
@ -269,6 +269,7 @@ if( ECM_FOUND )
|
||||
find_package( Qt5 COMPONENTS Test REQUIRED )
|
||||
include( ECMAddTests )
|
||||
endif()
|
||||
include(KDEInstallDirs)
|
||||
endif()
|
||||
|
||||
find_package( KF5 COMPONENTS CoreAddons Crash )
|
||||
|
@ -1,10 +1,11 @@
|
||||
find_package( KPMcore 3.3 )
|
||||
find_package( Qt5 REQUIRED DBus ) # Needed for KPMCore
|
||||
find_package( KF5 REQUIRED I18n WidgetsAddons ) # Needed for KPMCore
|
||||
|
||||
set( _partition_defs "" )
|
||||
|
||||
if ( KPMcore_FOUND )
|
||||
find_package( Qt5 REQUIRED DBus ) # Needed for KPMCore
|
||||
find_package( KF5 REQUIRED I18n WidgetsAddons ) # Needed for KPMCore
|
||||
|
||||
include_directories( ${KPMCORE_INCLUDE_DIR} )
|
||||
include_directories( ${PROJECT_BINARY_DIR}/src/libcalamares )
|
||||
|
||||
|
@ -15,11 +15,6 @@ endif()
|
||||
|
||||
find_package(ECM ${ECM_VERSION} REQUIRED NO_MODULE)
|
||||
|
||||
include(KDEInstallDirs)
|
||||
include(GenerateExportHeader)
|
||||
find_package( Qt5 REQUIRED DBus )
|
||||
find_package( KF5 REQUIRED Config CoreAddons I18n WidgetsAddons )
|
||||
|
||||
find_package( KPMcore 3.3 )
|
||||
set_package_properties(
|
||||
KPMcore PROPERTIES
|
||||
@ -27,6 +22,9 @@ set_package_properties(
|
||||
)
|
||||
|
||||
if ( KPMcore_FOUND )
|
||||
find_package( Qt5 REQUIRED DBus )
|
||||
find_package( KF5 REQUIRED Config CoreAddons I18n WidgetsAddons )
|
||||
|
||||
if ( KPMcore_VERSION VERSION_GREATER "3.3.0")
|
||||
list( APPEND _partition_defs WITH_KPMCORE331API) # kpmcore > 3.3.0 with deprecations
|
||||
endif()
|
||||
|
Loading…
Reference in New Issue
Block a user