diff --git a/CMakeLists.txt b/CMakeLists.txt --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -78,6 +78,7 @@ PURPOSE "Needed for emergency unlock in case that the greeter is broken. In case your distribution does not provide loginctl please contact plasma-devel@kde.org to discuss alternatives." ) +option(PAM_REQUIRED "Require building with PAM" ON) include(ConfigureChecks.cmake) configure_file(config-workspace.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-workspace.h) diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -5,6 +5,9 @@ TYPE OPTIONAL PURPOSE "Required for screen unlocking and optionally used by the KDM log in manager" ) +if(PAM_REQUIRED) +set_package_properties(PAM PROPERTIES TYPE REQUIRED) +endif() include(CheckTypeSize) include(FindPkgConfig)