summaryrefslogtreecommitdiff
path: root/cmake/FindPAM.cmake
blob: 1ada899c3b68047b595f02163fe9033e2ce929e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
find_path(PAM_INCLUDE_DIR NAMES security/pam_appl.h security/pam_misc.h)
find_library(PAM_LIBRARY pam)

if (PAM_INCLUDE_DIR AND PAM_LIBRARY)
	set(PAM_FOUND TRUE)
endif (PAM_INCLUDE_DIR AND PAM_LIBRARY)

if (PAM_INCLUDE_DIR)
	message(STATUS "Found PAM includes ${PAM_INCLUDE_DIR}")
else (PAM_INCLUDE_DIR)
	message(FATAL_ERROR "PAM includes were not found")
endif (PAM_INCLUDE_DIR)

if (PAM_LIBRARY)
        message(STATUS "Found PAM library ${PAM_LIBRARY}")
else (PAM_LIBRARY)
        message(FATAL_ERROR "PAM library was not found")
endif (PAM_LIBRARY)

mark_as_advanced(PAM_INCLUDE_DIR PAM_LIBRARY)