CMake: move kpmcore support into the helper-CMake-module
- find the dependencies just once - fix the interface for kpmcore so it can find its own includes (this is mostly relevant for Debian)
This commit is contained in:
parent
0e6d70c395
commit
ab813b607f
@ -18,10 +18,17 @@ if ( NOT KPMcore_searched_for )
|
|||||||
TYPE RECOMMENDED
|
TYPE RECOMMENDED
|
||||||
PURPOSE "For disk partitioning support"
|
PURPOSE "For disk partitioning support"
|
||||||
)
|
)
|
||||||
|
find_package(Qt5 REQUIRED DBus) # Needed for KPMCore
|
||||||
|
find_package(KF5 REQUIRED I18n WidgetsAddons) # Needed for KPMCore
|
||||||
|
|
||||||
if( KPMcore_FOUND )
|
if( KPMcore_FOUND )
|
||||||
set( KPMcore_API_DEFINITIONS "" )
|
set( KPMcore_API_DEFINITIONS "" )
|
||||||
else()
|
else()
|
||||||
set( KPMcore_API_DEFINITIONS WITHOUT_KPMcore )
|
set( KPMcore_API_DEFINITIONS WITHOUT_KPMcore )
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
foreach(d ${KPMcore_API_DEFINITIONS})
|
||||||
|
target_compile_definitions(kpmcore INTERFACE ${d})
|
||||||
|
endforeach()
|
||||||
|
target_include_directories(kpmcore INTERFACE ${KPMCORE_INCLUDE_DIR})
|
||||||
endif()
|
endif()
|
||||||
|
@ -115,13 +115,6 @@ endif()
|
|||||||
include(KPMcoreHelper)
|
include(KPMcoreHelper)
|
||||||
|
|
||||||
if(KPMcore_FOUND)
|
if(KPMcore_FOUND)
|
||||||
find_package(Qt5 REQUIRED DBus) # Needed for KPMCore
|
|
||||||
find_package(KF5 REQUIRED I18n WidgetsAddons) # Needed for KPMCore
|
|
||||||
|
|
||||||
foreach(d ${KPMcore_API_DEFINITIONS})
|
|
||||||
add_definitions(-D${d})
|
|
||||||
endforeach()
|
|
||||||
include_directories(${KPMCORE_INCLUDE_DIR})
|
|
||||||
target_sources(
|
target_sources(
|
||||||
calamares
|
calamares
|
||||||
PRIVATE
|
PRIVATE
|
||||||
|
Loading…
Reference in New Issue
Block a user