summaryrefslogtreecommitdiffstats
path: root/FindPAM.cmake
blob: f32467045b97dbb71ced1ebcb48a69c5511a84dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
FIND_PATH(PAM_INCLUDE_DIR security/pam_appl.h)
FIND_LIBRARY(PAM_LIBRARY NAMES pam)

IF (PAM_INCLUDE_DIR AND PAM_LIBRARY)
   SET(PAM_FOUND TRUE)
ENDIF (PAM_INCLUDE_DIR AND PAM_LIBRARY)

IF (PAM_FOUND)
   IF (NOT PAM_FIND_QUIETLY)
      MESSAGE(STATUS "Found PAM: ${PAM_LIBRARY}; include path: ${PAM_INCLUDE_DIR}")
   ENDIF (NOT PAM_FIND_QUIETLY)
ELSE (PAM_FOUND)
   IF (PAM_FIND_REQUIRED)
      MESSAGE(FATAL_ERROR "Could not find PAM")
   ENDIF (PAM_FIND_REQUIRED)
ENDIF (PAM_FOUND)