summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Gräßlin <[email protected]>2017-02-24 18:02:15 +0100
committerMartin Gräßlin <[email protected]>2017-03-17 17:50:21 +0100
commit6ef78dc09dad112f32a95029845407305ce77b90 (patch)
treeb3d391244cd59cb9173f5f0f56793de9c2ffba81
parent06917c1253eb644e139c28427f4fc4b8f3e0a41b (diff)
Require PAM by default and provide an option to not require it
Summary: The default should be what most distros and most users/devs use. On most distros kcheckpass would be broken without PAM. Thus to not require it is a severe issue. We have had many bug reports due to PAM missing during build and users not able to unlock. Slackware still requires a setup without PAM, thus a cmake option is added to not require PAM. Do: cmake -DPAM_REQUIRED=OFF /path/to/kscreenlocker/src to compile kscreenlocker without PAM support. CCMAIL: [email protected] CCMAIL: [email protected] Test Plan: Tested cmake with and without that option Reviewers: #plasma Subscribers: plasma-devel Tags: #plasma Differential Revision: https://phabricator.kde.org/D4768
-rw-r--r--CMakeLists.txt1
-rw-r--r--ConfigureChecks.cmake3
2 files changed, 4 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ec04a4d..3fdfb18 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -78,6 +78,7 @@ set_package_properties(loginctl PROPERTIES
PURPOSE "Needed for emergency unlock in case that the greeter is broken. In case your distribution does not provide loginctl please contact [email protected] 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
index 05c923c..bd586b1 100644
--- a/ConfigureChecks.cmake
+++ b/ConfigureChecks.cmake
@@ -5,6 +5,9 @@ set_package_properties(PAM PROPERTIES DESCRIPTION "PAM Libraries"
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)