calamares/src/modules/interactiveterminal/CMakeLists.txt
Adriaan de Groot 50dea6ded3 [interactiveterminal] Make optional if requirements not met
This is orthogonal to the SKIP_* mechanism already documented
for avoiding modules. If the module is enabled, but its dependencies
are not present, don't bother building the module. This follows
e.g. plasmalnf as an "avoidably heavy dependency".

Related to a misplaced comment in ISSUE #956
2018-05-26 07:09:01 -04:00

32 lines
842 B
CMake

find_package(ECM ${ECM_VERSION} REQUIRED NO_MODULE)
set( kf5_ver 5.41 )
find_package( KF5Service ${kf5_ver} )
find_package( KF5Parts ${kf5_ver} )
set_package_properties(
KF5Service PROPERTIES
PURPOSE "For finding KDE services at runtime"
)
set_package_properties(
KF5Parts PROPERTIES
PURPOSE "For finding KDE parts at runtime"
)
if ( KF5Parts_FOUND AND KF5Service_FOUND )
calamares_add_plugin( interactiveterminal
TYPE viewmodule
EXPORT_MACRO PLUGINDLLEXPORT_PRO
SOURCES
InteractiveTerminalViewStep.cpp
InteractiveTerminalPage.cpp
LINK_PRIVATE_LIBRARIES
calamaresui
LINK_LIBRARIES
KF5::Service
KF5::Parts
SHARED_LIB
)
else()
calamares_skip_module( "interactiveterminal (missing requirements)" )
endif()